/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/*
 * AITSM.java
 *
 * Created on Mar 22, 2012, 9:51:38 AM
 */
package Server;

import java.awt.Dimension;
import java.awt.Toolkit;
import java.sql.CallableStatement;
import java.sql.Connection;
import java.sql.Date;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.ResultSetMetaData;
import java.sql.SQLException;
import java.text.SimpleDateFormat;
import java.util.Vector;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.swing.DefaultCellEditor;
import javax.swing.DefaultComboBoxModel;
import javax.swing.JButton;
import javax.swing.JCheckBox;
import javax.swing.JDialog;
import javax.swing.JOptionPane;
import javax.swing.JTable;
import javax.swing.table.DefaultTableModel;

/**
 *
 * @author THANH
 */
public class AITSM extends javax.swing.JFrame {

    /** Creates new form AITSM */
    Connection con = null;
    CallableStatement call = null;
    PreparedStatement pre = null;
    ResultSet rs = null;
    DefaultTableModel model;
    DefaultComboBoxModel cbbmodel;
    MyTableModel mymodel1, mymodel2;
    String staffID = "GV001";

    public AITSM() {
        initComponents();
        try {
            Class.forName("com.microsoft.sqlserver.jdbc.SQLServerDriver");
            String url = "jdbc:sqlserver://localhost:1433;databaseName=AITSM;";
            con = java.sql.DriverManager.getConnection(url, "sa", "123456");
            System.out.println("Ket noi co so du lieu thanh cong");
        } catch (Exception ex) {
            JOptionPane.showMessageDialog(rootPane, "Ket noi csdl that bai \n" + ex);
        }
        this.setSize(new Dimension(948, 820));
        this.setResizable(false);
        Dimension ds = Toolkit.getDefaultToolkit().getScreenSize();
        this.setLocation((ds.width - this.getWidth()) / 2, (ds.height - this.getHeight()) / 2);
        menuStaffID.setVisible(false);


    }

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        btgrounduser = new javax.swing.ButtonGroup();
        jLabel1 = new javax.swing.JLabel();
        jTabbedPane1 = new javax.swing.JTabbedPane();
        jPanel14 = new javax.swing.JPanel();
        jPanel23 = new javax.swing.JPanel();
        quanlikhoa9 = new javax.swing.JPanel();
        qlkthaotac9 = new javax.swing.JPanel();
        btnxoauser = new javax.swing.JButton();
        btnxemprofile = new javax.swing.JButton();
        qlk8 = new javax.swing.JPanel();
        qlgvCreate1 = new javax.swing.JPanel();
        jLabel108 = new javax.swing.JLabel();
        txtuhoten1 = new javax.swing.JTextField();
        btnuCapNhat = new javax.swing.JButton();
        jLabel137 = new javax.swing.JLabel();
        cbbukhoa = new javax.swing.JComboBox();
        jLabel138 = new javax.swing.JLabel();
        dateungaysinh = new com.toedter.calendar.JDateChooser();
        jLabel139 = new javax.swing.JLabel();
        cbbugioitinh1 = new javax.swing.JComboBox();
        jLabel140 = new javax.swing.JLabel();
        txtudantoc = new javax.swing.JTextField();
        jLabel141 = new javax.swing.JLabel();
        txtuquoctich = new javax.swing.JTextField();
        jLabel142 = new javax.swing.JLabel();
        txtuemail = new javax.swing.JTextField();
        jLabel143 = new javax.swing.JLabel();
        txtudienthoai = new javax.swing.JTextField();
        jLabel144 = new javax.swing.JLabel();
        txtucmnd = new javax.swing.JTextField();
        jLabel145 = new javax.swing.JLabel();
        txtudiachi = new javax.swing.JTextField();
        jLabel146 = new javax.swing.JLabel();
        txtuhocvi = new javax.swing.JTextField();
        btnxemprofile1 = new javax.swing.JButton();
        jLabel175 = new javax.swing.JLabel();
        cbbuTrangThai = new javax.swing.JComboBox();
        qlgvEdit1 = new javax.swing.JPanel();
        jLabel147 = new javax.swing.JLabel();
        txtugvidthem = new javax.swing.JTextField();
        btngvCapnhat1 = new javax.swing.JButton();
        jLabel148 = new javax.swing.JLabel();
        cbbugioitinhthem = new javax.swing.JComboBox();
        jLabel178 = new javax.swing.JLabel();
        jLabel179 = new javax.swing.JLabel();
        jLabel180 = new javax.swing.JLabel();
        jLabel182 = new javax.swing.JLabel();
        jLabel183 = new javax.swing.JLabel();
        jLabel184 = new javax.swing.JLabel();
        cbbutrangthai = new javax.swing.JComboBox();
        txtuhoten2 = new javax.swing.JTextField();
        txtukhoa = new javax.swing.JTextField();
        cbburole = new javax.swing.JComboBox();
        pass = new javax.swing.JPasswordField();
        retypepass = new javax.swing.JPasswordField();
        qlgvEditUser = new javax.swing.JPanel();
        jLabel176 = new javax.swing.JLabel();
        txtugvid = new javax.swing.JTextField();
        btngvCapnhat2 = new javax.swing.JButton();
        jLabel177 = new javax.swing.JLabel();
        jLabel185 = new javax.swing.JLabel();
        jLabel187 = new javax.swing.JLabel();
        jLabel189 = new javax.swing.JLabel();
        jLabel190 = new javax.swing.JLabel();
        cbbutrangthai1 = new javax.swing.JComboBox();
        txtuhoten3 = new javax.swing.JTextField();
        cbburole1 = new javax.swing.JComboBox();
        pass1 = new javax.swing.JPasswordField();
        retypepass1 = new javax.swing.JPasswordField();
        jPanel32 = new javax.swing.JPanel();
        jLabel186 = new javax.swing.JLabel();
        txtuser = new javax.swing.JTextField();
        jScrollPane15 = new javax.swing.JScrollPane();
        tableGiangVien1 = new javax.swing.JTable();
        rduser = new javax.swing.JRadioButton();
        rdgv = new javax.swing.JRadioButton();
        pnQuanLiKhoa = new javax.swing.JPanel();
        quanlikhoa = new javax.swing.JPanel();
        qlkthaotac = new javax.swing.JPanel();
        btnKDelete = new javax.swing.JButton();
        btnCreate1 = new javax.swing.JButton();
        qlk = new javax.swing.JPanel();
        qlkCreate = new javax.swing.JPanel();
        jLabel2 = new javax.swing.JLabel();
        txtKTenKhoaT = new javax.swing.JTextField();
        jLabel5 = new javax.swing.JLabel();
        btnKResetT = new javax.swing.JButton();
        cbbKTrangThaiT = new javax.swing.JComboBox();
        btnKThemmoiT = new javax.swing.JButton();
        qlkEdit = new javax.swing.JPanel();
        jLabel3 = new javax.swing.JLabel();
        jLabel6 = new javax.swing.JLabel();
        cbbKTrangThai2 = new javax.swing.JComboBox();
        jLabel7 = new javax.swing.JLabel();
        txtKKhoaID2 = new javax.swing.JTextField();
        txtKTenKhoa2 = new javax.swing.JTextField();
        btnKCapNhat = new javax.swing.JButton();
        jScrollPane1 = new javax.swing.JScrollPane();
        tableKhoa = new javax.swing.JTable();
        jLabel8 = new javax.swing.JLabel();
        txtdasdasdas1 = new javax.swing.JTextField();
        jPanel2 = new javax.swing.JPanel();
        jPanel15 = new javax.swing.JPanel();
        quanlikhoa2 = new javax.swing.JPanel();
        qlkthaotac2 = new javax.swing.JPanel();
        btnKHDelete = new javax.swing.JButton();
        btnCreate3 = new javax.swing.JButton();
        qlk1 = new javax.swing.JPanel();
        qlkhCreate = new javax.swing.JPanel();
        jLabel9 = new javax.swing.JLabel();
        txtKHTenKhoaHoc = new javax.swing.JTextField();
        jButton4 = new javax.swing.JButton();
        btnCreate4 = new javax.swing.JButton();
        jLabel16 = new javax.swing.JLabel();
        cbbKHKhoa = new javax.swing.JComboBox();
        qlkhEdit = new javax.swing.JPanel();
        jLabel11 = new javax.swing.JLabel();
        jLabel12 = new javax.swing.JLabel();
        txtKHKhoaHocID = new javax.swing.JTextField();
        txtKHTenKhoaHoc2 = new javax.swing.JTextField();
        btnKHCapNhat = new javax.swing.JButton();
        jLabel17 = new javax.swing.JLabel();
        cbbKHKhoa2 = new javax.swing.JComboBox();
        jScrollPane2 = new javax.swing.JScrollPane();
        tableKhoaHoc = new javax.swing.JTable();
        txtSearchKhoaHoc = new javax.swing.JTextField();
        jLabel14 = new javax.swing.JLabel();
        jPanel3 = new javax.swing.JPanel();
        jPanel16 = new javax.swing.JPanel();
        quanlikhoa3 = new javax.swing.JPanel();
        qlkthaotac3 = new javax.swing.JPanel();
        btnDelete7 = new javax.swing.JButton();
        btnCreate5 = new javax.swing.JButton();
        qlk2 = new javax.swing.JPanel();
        qlkyCreate = new javax.swing.JPanel();
        jLabel18 = new javax.swing.JLabel();
        txtKYTenKy1 = new javax.swing.JTextField();
        bntReset = new javax.swing.JButton();
        btnCreate6 = new javax.swing.JButton();
        jLabel20 = new javax.swing.JLabel();
        cbbKYKhoaHoc1 = new javax.swing.JComboBox();
        jLabel29 = new javax.swing.JLabel();
        dateKyNBD1 = new com.toedter.calendar.JDateChooser();
        jLabel30 = new javax.swing.JLabel();
        dateKYNKT1 = new com.toedter.calendar.JDateChooser();
        jLabel23 = new javax.swing.JLabel();
        cbbKYKhoa1 = new javax.swing.JComboBox();
        qlkyEdit = new javax.swing.JPanel();
        jLabel21 = new javax.swing.JLabel();
        jLabel22 = new javax.swing.JLabel();
        txtkykyid = new javax.swing.JTextField();
        txtkytenky2 = new javax.swing.JTextField();
        btnkyCapnhat = new javax.swing.JButton();
        jLabel24 = new javax.swing.JLabel();
        cbbKyKhoaHoc2 = new javax.swing.JComboBox();
        jLabel27 = new javax.swing.JLabel();
        datenbd2 = new com.toedter.calendar.JDateChooser();
        jLabel28 = new javax.swing.JLabel();
        datekynkt2 = new com.toedter.calendar.JDateChooser();
        cbbKYKhoa3 = new javax.swing.JComboBox();
        jLabel26 = new javax.swing.JLabel();
        jScrollPane3 = new javax.swing.JScrollPane();
        tableKy = new javax.swing.JTable();
        jLabel25 = new javax.swing.JLabel();
        txtSearchKy = new javax.swing.JTextField();
        jPanel5 = new javax.swing.JPanel();
        jPanel17 = new javax.swing.JPanel();
        quanlikhoa4 = new javax.swing.JPanel();
        qlkthaotac4 = new javax.swing.JPanel();
        btnDelete9 = new javax.swing.JButton();
        btnCreate7 = new javax.swing.JButton();
        qlk3 = new javax.swing.JPanel();
        qllopCreate = new javax.swing.JPanel();
        jLabel31 = new javax.swing.JLabel();
        txtloptenlop1 = new javax.swing.JTextField();
        btnlopreset = new javax.swing.JButton();
        btnCreate8 = new javax.swing.JButton();
        jLabel33 = new javax.swing.JLabel();
        cbblopKhoaHoc1 = new javax.swing.JComboBox();
        jLabel156 = new javax.swing.JLabel();
        cbblopKhoa1 = new javax.swing.JComboBox();
        qllopEdit = new javax.swing.JPanel();
        jLabel34 = new javax.swing.JLabel();
        jLabel35 = new javax.swing.JLabel();
        cbblopkhoa2 = new javax.swing.JComboBox();
        jLabel36 = new javax.swing.JLabel();
        txtloplopid = new javax.swing.JTextField();
        txtloptenlop2 = new javax.swing.JTextField();
        btnlopcapnhat = new javax.swing.JButton();
        jLabel37 = new javax.swing.JLabel();
        cbblopkhoahoc2 = new javax.swing.JComboBox();
        jScrollPane4 = new javax.swing.JScrollPane();
        tableLop = new javax.swing.JTable();
        txtSearchLop = new javax.swing.JTextField();
        jLabel38 = new javax.swing.JLabel();
        jPanel6 = new javax.swing.JPanel();
        jPanel18 = new javax.swing.JPanel();
        quanlikhoa5 = new javax.swing.JPanel();
        qlkthaotac5 = new javax.swing.JPanel();
        btnnhomxoa = new javax.swing.JButton();
        btnCreate9 = new javax.swing.JButton();
        qlk4 = new javax.swing.JPanel();
        qlnhomCreate = new javax.swing.JPanel();
        jLabel40 = new javax.swing.JLabel();
        txtnhomtennhom1 = new javax.swing.JTextField();
        jLabel41 = new javax.swing.JLabel();
        btnnhomreset = new javax.swing.JButton();
        cbbnhomtt1 = new javax.swing.JComboBox();
        btnnhomthem = new javax.swing.JButton();
        jLabel42 = new javax.swing.JLabel();
        cbbnhomky1 = new javax.swing.JComboBox();
        jLabel157 = new javax.swing.JLabel();
        cbbnhomkhoa1 = new javax.swing.JComboBox();
        jLabel158 = new javax.swing.JLabel();
        cbbnhomkhoahoc1 = new javax.swing.JComboBox();
        qlnhomEdit = new javax.swing.JPanel();
        jLabel43 = new javax.swing.JLabel();
        jLabel44 = new javax.swing.JLabel();
        cbbnhomky2 = new javax.swing.JComboBox();
        jLabel45 = new javax.swing.JLabel();
        txtnhomnhomid = new javax.swing.JTextField();
        txtnhomtennhom2 = new javax.swing.JTextField();
        btnnhomcapnhat = new javax.swing.JButton();
        jLabel46 = new javax.swing.JLabel();
        cbbnhomtt2 = new javax.swing.JComboBox();
        jLabel159 = new javax.swing.JLabel();
        cbbnhomkhoahoc2 = new javax.swing.JComboBox();
        jLabel160 = new javax.swing.JLabel();
        cbbnhomkhoa2 = new javax.swing.JComboBox();
        jScrollPane5 = new javax.swing.JScrollPane();
        tableNhom = new javax.swing.JTable();
        jLabel47 = new javax.swing.JLabel();
        txtSearchNhom = new javax.swing.JTextField();
        jPanel7 = new javax.swing.JPanel();
        jPanel19 = new javax.swing.JPanel();
        quanlikhoa6 = new javax.swing.JPanel();
        qlkthaotac6 = new javax.swing.JPanel();
        btnDelete13 = new javax.swing.JButton();
        btnCreate11 = new javax.swing.JButton();
        qlk5 = new javax.swing.JPanel();
        qlmonCreate = new javax.swing.JPanel();
        jLabel49 = new javax.swing.JLabel();
        txtmhtenmon1 = new javax.swing.JTextField();
        jLabel50 = new javax.swing.JLabel();
        btnmhreset = new javax.swing.JButton();
        cbbmhtt1 = new javax.swing.JComboBox();
        btnmhthem = new javax.swing.JButton();
        jLabel51 = new javax.swing.JLabel();
        cbbmhkhoa1 = new javax.swing.JComboBox();
        jLabel59 = new javax.swing.JLabel();
        txtmhtong1 = new javax.swing.JTextField();
        qlmonEdit = new javax.swing.JPanel();
        jLabel52 = new javax.swing.JLabel();
        jLabel53 = new javax.swing.JLabel();
        cbbmhtt2 = new javax.swing.JComboBox();
        jLabel54 = new javax.swing.JLabel();
        txtmhmonhocid = new javax.swing.JTextField();
        txtmhtenmon2 = new javax.swing.JTextField();
        btnmhCapnhat = new javax.swing.JButton();
        jLabel55 = new javax.swing.JLabel();
        cbbmhKhoa2 = new javax.swing.JComboBox();
        jLabel58 = new javax.swing.JLabel();
        txtmhtong2 = new javax.swing.JTextField();
        jScrollPane6 = new javax.swing.JScrollPane();
        tableMon = new javax.swing.JTable();
        jLabel56 = new javax.swing.JLabel();
        txtSearchMonHoc = new javax.swing.JTextField();
        jPanel8 = new javax.swing.JPanel();
        jPanel20 = new javax.swing.JPanel();
        quanlikhoa7 = new javax.swing.JPanel();
        qlkthaotac7 = new javax.swing.JPanel();
        btnsvdelete = new javax.swing.JButton();
        btnCreate13 = new javax.swing.JButton();
        qlk6 = new javax.swing.JPanel();
        qlsvCreate = new javax.swing.JPanel();
        jLabel60 = new javax.swing.JLabel();
        txtsvhoten1 = new javax.swing.JTextField();
        jLabel61 = new javax.swing.JLabel();
        btnsvreset = new javax.swing.JButton();
        cbbsvtt1 = new javax.swing.JComboBox();
        btnsvthem = new javax.swing.JButton();
        jLabel62 = new javax.swing.JLabel();
        cbbsvkhoa1 = new javax.swing.JComboBox();
        jLabel63 = new javax.swing.JLabel();
        datesvngaysinh1 = new com.toedter.calendar.JDateChooser();
        jLabel71 = new javax.swing.JLabel();
        cbbsvkhoahoc1 = new javax.swing.JComboBox();
        jLabel72 = new javax.swing.JLabel();
        txtsvdantoc1 = new javax.swing.JTextField();
        jLabel73 = new javax.swing.JLabel();
        txtsvquoctich1 = new javax.swing.JTextField();
        jLabel74 = new javax.swing.JLabel();
        txtsvemail1 = new javax.swing.JTextField();
        jLabel75 = new javax.swing.JLabel();
        txtsvdienthoai1 = new javax.swing.JTextField();
        jLabel76 = new javax.swing.JLabel();
        txtsvcmnd1 = new javax.swing.JTextField();
        jLabel77 = new javax.swing.JLabel();
        txtsvdiachi1 = new javax.swing.JTextField();
        jLabel69 = new javax.swing.JLabel();
        cbbsvlop1 = new javax.swing.JComboBox();
        jLabel162 = new javax.swing.JLabel();
        cbbsvgiotinh1 = new javax.swing.JComboBox();
        qlsvEdit = new javax.swing.JPanel();
        jLabel64 = new javax.swing.JLabel();
        txtsvsinhvienid = new javax.swing.JTextField();
        btnsvcapnhat = new javax.swing.JButton();
        jLabel65 = new javax.swing.JLabel();
        jLabel78 = new javax.swing.JLabel();
        txtsvdienthoai2 = new javax.swing.JTextField();
        jLabel79 = new javax.swing.JLabel();
        txtsvcmnd2 = new javax.swing.JTextField();
        jLabel80 = new javax.swing.JLabel();
        cbbsvgioitinh2 = new javax.swing.JComboBox();
        jLabel81 = new javax.swing.JLabel();
        jLabel82 = new javax.swing.JLabel();
        datesvngaysinh2 = new com.toedter.calendar.JDateChooser();
        txtsvemail2 = new javax.swing.JTextField();
        jLabel83 = new javax.swing.JLabel();
        txtsvquoctich2 = new javax.swing.JTextField();
        jLabel84 = new javax.swing.JLabel();
        txtsvdantoc2 = new javax.swing.JTextField();
        txtsvdiachi2 = new javax.swing.JTextField();
        cbbsvlop2 = new javax.swing.JComboBox();
        jLabel66 = new javax.swing.JLabel();
        jLabel67 = new javax.swing.JLabel();
        jLabel68 = new javax.swing.JLabel();
        cbbsvtt2 = new javax.swing.JComboBox();
        txtsvhoten2 = new javax.swing.JTextField();
        jLabel70 = new javax.swing.JLabel();
        cbbsvkhoa2 = new javax.swing.JComboBox();
        jLabel163 = new javax.swing.JLabel();
        cbbsvkhoahoc2 = new javax.swing.JComboBox();
        jPanel1 = new javax.swing.JPanel();
        jLabel161 = new javax.swing.JLabel();
        txtSearchSinhvien = new javax.swing.JTextField();
        jScrollPane7 = new javax.swing.JScrollPane();
        tableSinhvien = new javax.swing.JTable();
        jPanel9 = new javax.swing.JPanel();
        jPanel21 = new javax.swing.JPanel();
        quanlikhoa8 = new javax.swing.JPanel();
        qlkthaotac8 = new javax.swing.JPanel();
        btngvdelete = new javax.swing.JButton();
        btnCreate15 = new javax.swing.JButton();
        qlk7 = new javax.swing.JPanel();
        qlgvCreate = new javax.swing.JPanel();
        jLabel85 = new javax.swing.JLabel();
        txtgvhoten1 = new javax.swing.JTextField();
        jLabel86 = new javax.swing.JLabel();
        btngvReset = new javax.swing.JButton();
        cbbgvtt1 = new javax.swing.JComboBox();
        btngvThem = new javax.swing.JButton();
        jLabel87 = new javax.swing.JLabel();
        cbbgvkhoa1 = new javax.swing.JComboBox();
        jLabel88 = new javax.swing.JLabel();
        dategvngaysinh1 = new com.toedter.calendar.JDateChooser();
        jLabel89 = new javax.swing.JLabel();
        cbbgvgioitinh1 = new javax.swing.JComboBox();
        jLabel90 = new javax.swing.JLabel();
        txtgvdantoc1 = new javax.swing.JTextField();
        jLabel91 = new javax.swing.JLabel();
        txtgvquoctich1 = new javax.swing.JTextField();
        jLabel92 = new javax.swing.JLabel();
        txtgvemail1 = new javax.swing.JTextField();
        jLabel93 = new javax.swing.JLabel();
        txtgvdienthoai1 = new javax.swing.JTextField();
        jLabel94 = new javax.swing.JLabel();
        txtgvcmnd1 = new javax.swing.JTextField();
        jLabel95 = new javax.swing.JLabel();
        txtgvdiachi1 = new javax.swing.JTextField();
        jLabel110 = new javax.swing.JLabel();
        txtgvhocvi1 = new javax.swing.JTextField();
        qlgvEdit = new javax.swing.JPanel();
        jLabel96 = new javax.swing.JLabel();
        txtgvgvid = new javax.swing.JTextField();
        btngvCapnhat = new javax.swing.JButton();
        jLabel97 = new javax.swing.JLabel();
        jLabel98 = new javax.swing.JLabel();
        txtgvdienthoai2 = new javax.swing.JTextField();
        jLabel99 = new javax.swing.JLabel();
        txtgvcmnd2 = new javax.swing.JTextField();
        jLabel100 = new javax.swing.JLabel();
        cbbgvgioitinh2 = new javax.swing.JComboBox();
        jLabel101 = new javax.swing.JLabel();
        jLabel102 = new javax.swing.JLabel();
        dategvNgaysinh2 = new com.toedter.calendar.JDateChooser();
        txtgvemail2 = new javax.swing.JTextField();
        jLabel103 = new javax.swing.JLabel();
        txtgvquoctich2 = new javax.swing.JTextField();
        jLabel104 = new javax.swing.JLabel();
        txtgvdantoc2 = new javax.swing.JTextField();
        txtgvdiachi2 = new javax.swing.JTextField();
        cbbgvkhoa2 = new javax.swing.JComboBox();
        jLabel105 = new javax.swing.JLabel();
        jLabel106 = new javax.swing.JLabel();
        jLabel107 = new javax.swing.JLabel();
        cbbgvtt2 = new javax.swing.JComboBox();
        txtgvhoten2 = new javax.swing.JTextField();
        jLabel111 = new javax.swing.JLabel();
        txtgvhocvi2 = new javax.swing.JTextField();
        jPanel28 = new javax.swing.JPanel();
        jLabel164 = new javax.swing.JLabel();
        txtSearchGiangVien = new javax.swing.JTextField();
        jScrollPane8 = new javax.swing.JScrollPane();
        tableGiangVien = new javax.swing.JTable();
        jPanel10 = new javax.swing.JPanel();
        jLabel112 = new javax.swing.JLabel();
        cbbtkbkhoa = new javax.swing.JComboBox();
        jLabel113 = new javax.swing.JLabel();
        jLabel114 = new javax.swing.JLabel();
        cbbtkbkhoahoc = new javax.swing.JComboBox();
        cbbtkbky = new javax.swing.JComboBox();
        jLabel115 = new javax.swing.JLabel();
        cbbtkbnhom = new javax.swing.JComboBox();
        jScrollPane9 = new javax.swing.JScrollPane();
        tableThoiKhoaBieu = new javax.swing.JTable();
        jPanel4 = new javax.swing.JPanel();
        btnThemmoi = new javax.swing.JButton();
        btntkbDelete = new javax.swing.JButton();
        jPanel22 = new javax.swing.JPanel();
        qltkbCreate = new javax.swing.JPanel();
        jLabel165 = new javax.swing.JLabel();
        jLabel166 = new javax.swing.JLabel();
        cbbtkbtkt3 = new javax.swing.JComboBox();
        btntkbThem = new javax.swing.JButton();
        jLabel167 = new javax.swing.JLabel();
        cbbtkbgiangvien3 = new javax.swing.JComboBox();
        jLabel168 = new javax.swing.JLabel();
        jLabel169 = new javax.swing.JLabel();
        cbbtkbmon3 = new javax.swing.JComboBox();
        cbbtkbthu3 = new javax.swing.JComboBox();
        jLabel170 = new javax.swing.JLabel();
        cbbtkbtt3 = new javax.swing.JComboBox();
        jLabel171 = new javax.swing.JLabel();
        txttkbphong3 = new javax.swing.JTextField();
        cbbtkbtbd3 = new javax.swing.JComboBox();
        jLabel172 = new javax.swing.JLabel();
        txttkbtong3 = new javax.swing.JTextField();
        qltkbEdit = new javax.swing.JPanel();
        jLabel123 = new javax.swing.JLabel();
        jLabel124 = new javax.swing.JLabel();
        cbbtkbtkt2 = new javax.swing.JComboBox();
        btntkbCapNhat = new javax.swing.JButton();
        jLabel125 = new javax.swing.JLabel();
        cbbtkbgiangvien2 = new javax.swing.JComboBox();
        jLabel126 = new javax.swing.JLabel();
        jLabel127 = new javax.swing.JLabel();
        cbbtkbmon2 = new javax.swing.JComboBox();
        cbbtkbthu2 = new javax.swing.JComboBox();
        jLabel128 = new javax.swing.JLabel();
        cbbtkbtt2 = new javax.swing.JComboBox();
        jLabel129 = new javax.swing.JLabel();
        txttkbphong2 = new javax.swing.JTextField();
        jLabel130 = new javax.swing.JLabel();
        txttkbtkbid = new javax.swing.JTextField();
        cbbtkbtbd2 = new javax.swing.JComboBox();
        jLabel173 = new javax.swing.JLabel();
        txttkbtong2 = new javax.swing.JTextField();
        jPanel31 = new javax.swing.JPanel();
        cbbpnnhom = new javax.swing.JComboBox();
        jLabel116 = new javax.swing.JLabel();
        cbbpnkhoa = new javax.swing.JComboBox();
        jLabel117 = new javax.swing.JLabel();
        jLabel118 = new javax.swing.JLabel();
        cbbpnkhoahoc = new javax.swing.JComboBox();
        cbbpnmon = new javax.swing.JComboBox();
        jLabel119 = new javax.swing.JLabel();
        cbbpnlop = new javax.swing.JComboBox();
        jLabel120 = new javax.swing.JLabel();
        jScrollPane13 = new javax.swing.JScrollPane();
        tableSinhVienLop = new javax.swing.JTable();
        jScrollPane14 = new javax.swing.JScrollPane();
        tableSinhVienNhom = new javax.swing.JTable();
        btnpnthem = new javax.swing.JButton();
        btnpnxoa = new javax.swing.JButton();
        jLabel121 = new javax.swing.JLabel();
        cbbpnkhoahoc1 = new javax.swing.JComboBox();
        cbbpnkyhoc = new javax.swing.JComboBox();
        jLabel122 = new javax.swing.JLabel();
        jPanel11 = new javax.swing.JPanel();
        jPanel29 = new javax.swing.JPanel();
        btnCreate20 = new javax.swing.JButton();
        btnddds1 = new javax.swing.JButton();
        btnCreate21 = new javax.swing.JButton();
        jPanel30 = new javax.swing.JPanel();
        jLabel131 = new javax.swing.JLabel();
        jLabel132 = new javax.swing.JLabel();
        cbbddkhoa = new javax.swing.JComboBox();
        jLabel136 = new javax.swing.JLabel();
        cbbddmonhoc = new javax.swing.JComboBox();
        cbbddngay = new javax.swing.JComboBox();
        jLabel133 = new javax.swing.JLabel();
        cbbddnhom = new javax.swing.JComboBox();
        cbbddkhoahoc = new javax.swing.JComboBox();
        jLabel135 = new javax.swing.JLabel();
        cbbddkyhoc = new javax.swing.JComboBox();
        jLabel134 = new javax.swing.JLabel();
        jScrollPane10 = new javax.swing.JScrollPane();
        tableDiemDanh = new javax.swing.JTable();
        btnddSave = new javax.swing.JButton();
        jPanel12 = new javax.swing.JPanel();
        cbbtpkyhoc = new javax.swing.JComboBox();
        jLabel149 = new javax.swing.JLabel();
        jLabel150 = new javax.swing.JLabel();
        cbbtpkhoahoc = new javax.swing.JComboBox();
        cbbtpkhoa = new javax.swing.JComboBox();
        jLabel152 = new javax.swing.JLabel();
        jLabel153 = new javax.swing.JLabel();
        cbbtpdanhsach = new javax.swing.JComboBox();
        jLabel154 = new javax.swing.JLabel();
        cbbtplop = new javax.swing.JComboBox();
        jScrollPane11 = new javax.swing.JScrollPane();
        tableFine = new javax.swing.JTable();
        jLabel151 = new javax.swing.JLabel();
        txttpSearch = new javax.swing.JTextField();
        jPanel24 = new javax.swing.JPanel();
        btntpCapNhat = new javax.swing.JButton();
        jButton28 = new javax.swing.JButton();
        jLabel174 = new javax.swing.JLabel();
        cbbtpnhom = new javax.swing.JComboBox();
        jPanel13 = new javax.swing.JPanel();
        jPanel25 = new javax.swing.JPanel();
        jPanel26 = new javax.swing.JPanel();
        TKB = new javax.swing.JRadioButton();
        DSNHOM = new javax.swing.JRadioButton();
        DSLOP = new javax.swing.JRadioButton();
        jRadioButton4 = new javax.swing.JRadioButton();
        jLabel155 = new javax.swing.JLabel();
        search = new javax.swing.JTextField();
        jButton30 = new javax.swing.JButton();
        jScrollPane12 = new javax.swing.JScrollPane();
        TIMKIEM = new javax.swing.JTable();
        jPanel27 = new javax.swing.JPanel();
        jButton31 = new javax.swing.JButton();
        mbMenu = new javax.swing.JMenuBar();
        jMenu1 = new javax.swing.JMenu();
        menuStaffName = new javax.swing.JMenu();
        jMenu3 = new javax.swing.JMenu();
        jMenu4 = new javax.swing.JMenu();
        menuStaffID = new javax.swing.JMenu();

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
        setTitle("AITSM");

        jLabel1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Images/banner.png"))); // NOI18N
        jLabel1.setAlignmentY(0.0F);
        jLabel1.setAutoscrolls(true);

        jTabbedPane1.setTabPlacement(javax.swing.JTabbedPane.LEFT);

        jPanel14.addComponentListener(new java.awt.event.ComponentAdapter() {
            public void componentShown(java.awt.event.ComponentEvent evt) {
                jPanel14ComponentShown(evt);
            }
        });

        quanlikhoa9.setAlignmentX(0.0F);
        quanlikhoa9.setAlignmentY(0.0F);

        qlkthaotac9.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Thao tác", javax.swing.border.TitledBorder.LEFT, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Tahoma", 1, 12))); // NOI18N

        btnxoauser.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Images/Delete.png"))); // NOI18N
        btnxoauser.setText("Xóa");
        btnxoauser.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnxoauserActionPerformed(evt);
            }
        });

        btnxemprofile.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Images/add.png"))); // NOI18N
        btnxemprofile.setText("Profile");
        btnxemprofile.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnxemprofileActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout qlkthaotac9Layout = new javax.swing.GroupLayout(qlkthaotac9);
        qlkthaotac9.setLayout(qlkthaotac9Layout);
        qlkthaotac9Layout.setHorizontalGroup(
            qlkthaotac9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(qlkthaotac9Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(qlkthaotac9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(btnxemprofile, javax.swing.GroupLayout.PREFERRED_SIZE, 121, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(btnxoauser, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 121, Short.MAX_VALUE))
                .addContainerGap())
        );
        qlkthaotac9Layout.setVerticalGroup(
            qlkthaotac9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(qlkthaotac9Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(btnxemprofile)
                .addGap(18, 18, 18)
                .addComponent(btnxoauser)
                .addContainerGap(142, Short.MAX_VALUE))
        );

        qlk8.setLayout(new java.awt.CardLayout());

        qlgvCreate1.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Thông tin cá nhân", javax.swing.border.TitledBorder.LEFT, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Tahoma", 1, 12))); // NOI18N
        qlgvCreate1.setAlignmentX(0.0F);
        qlgvCreate1.setAlignmentY(0.0F);

        jLabel108.setText("Họ tên: ");

        btnuCapNhat.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Images/add.png"))); // NOI18N
        btnuCapNhat.setText("Cập nhật");
        btnuCapNhat.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnuCapNhatActionPerformed(evt);
            }
        });

        jLabel137.setText("Khoa: ");

        cbbukhoa.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Item 1", "Item 2", "Item 3", "Item 4" }));

        jLabel138.setText("Ngày sinh: ");

        jLabel139.setText("Giới tính: ");

        cbbugioitinh1.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Nam", "Nữ" }));

        jLabel140.setText("Dân tộc: ");

        jLabel141.setText("Quốc tịch: ");

        jLabel142.setText("Email: ");

        txtuemail.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                txtuemailActionPerformed(evt);
            }
        });

        jLabel143.setText("Điện thoại: ");

        jLabel144.setText("CMND: ");

        jLabel145.setText("Địa chỉ: ");

        jLabel146.setText("Học vị: ");

        btnxemprofile1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Images/add.png"))); // NOI18N
        btnxemprofile1.setText("Thay đổi mật khẩu");
        btnxemprofile1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnxemprofile1ActionPerformed(evt);
            }
        });

        jLabel175.setText("Trạng Thái: ");

        cbbuTrangThai.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Enable", "Disable" }));

        javax.swing.GroupLayout qlgvCreate1Layout = new javax.swing.GroupLayout(qlgvCreate1);
        qlgvCreate1.setLayout(qlgvCreate1Layout);
        qlgvCreate1Layout.setHorizontalGroup(
            qlgvCreate1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(qlgvCreate1Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(qlgvCreate1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(qlgvCreate1Layout.createSequentialGroup()
                        .addGroup(qlgvCreate1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jLabel138)
                            .addComponent(jLabel137)
                            .addComponent(jLabel108))
                        .addGap(17, 17, 17)
                        .addGroup(qlgvCreate1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                            .addComponent(txtuhoten1, javax.swing.GroupLayout.PREFERRED_SIZE, 423, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addGroup(qlgvCreate1Layout.createSequentialGroup()
                                .addComponent(cbbukhoa, javax.swing.GroupLayout.PREFERRED_SIZE, 177, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addGap(27, 27, 27)
                                .addComponent(jLabel139)
                                .addGap(10, 10, 10)
                                .addComponent(cbbugioitinh1, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                            .addGroup(qlgvCreate1Layout.createSequentialGroup()
                                .addComponent(dateungaysinh, javax.swing.GroupLayout.PREFERRED_SIZE, 177, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addGap(27, 27, 27)
                                .addComponent(jLabel140)
                                .addGap(11, 11, 11)
                                .addComponent(txtudantoc))))
                    .addGroup(qlgvCreate1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                        .addGroup(javax.swing.GroupLayout.Alignment.LEADING, qlgvCreate1Layout.createSequentialGroup()
                            .addComponent(jLabel141)
                            .addGap(19, 19, 19)
                            .addComponent(txtuquoctich, javax.swing.GroupLayout.PREFERRED_SIZE, 177, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addGap(27, 27, 27)
                            .addComponent(jLabel142)
                            .addGap(24, 24, 24)
                            .addComponent(txtuemail))
                        .addGroup(javax.swing.GroupLayout.Alignment.LEADING, qlgvCreate1Layout.createSequentialGroup()
                            .addComponent(jLabel143)
                            .addGap(15, 15, 15)
                            .addComponent(txtudienthoai, javax.swing.GroupLayout.PREFERRED_SIZE, 158, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addGap(46, 46, 46)
                            .addComponent(jLabel144)
                            .addGap(19, 19, 19)
                            .addComponent(txtucmnd))
                        .addGroup(javax.swing.GroupLayout.Alignment.LEADING, qlgvCreate1Layout.createSequentialGroup()
                            .addGroup(qlgvCreate1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                .addComponent(jLabel145)
                                .addComponent(jLabel146))
                            .addGap(32, 32, 32)
                            .addGroup(qlgvCreate1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                .addComponent(txtudiachi, javax.swing.GroupLayout.PREFERRED_SIZE, 423, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addGroup(qlgvCreate1Layout.createSequentialGroup()
                                    .addComponent(txtuhocvi, javax.swing.GroupLayout.PREFERRED_SIZE, 156, javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addGap(48, 48, 48)
                                    .addComponent(jLabel175)
                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                    .addComponent(cbbuTrangThai, javax.swing.GroupLayout.PREFERRED_SIZE, 106, javax.swing.GroupLayout.PREFERRED_SIZE))
                                .addGroup(qlgvCreate1Layout.createSequentialGroup()
                                    .addGap(42, 42, 42)
                                    .addComponent(btnuCapNhat, javax.swing.GroupLayout.PREFERRED_SIZE, 134, javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addGap(18, 18, 18)
                                    .addComponent(btnxemprofile1, javax.swing.GroupLayout.PREFERRED_SIZE, 179, javax.swing.GroupLayout.PREFERRED_SIZE))))))
                .addContainerGap(18, Short.MAX_VALUE))
        );
        qlgvCreate1Layout.setVerticalGroup(
            qlgvCreate1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(qlgvCreate1Layout.createSequentialGroup()
                .addGroup(qlgvCreate1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(qlgvCreate1Layout.createSequentialGroup()
                        .addGap(3, 3, 3)
                        .addComponent(jLabel108))
                    .addComponent(txtuhoten1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(7, 7, 7)
                .addGroup(qlgvCreate1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(cbbugioitinh1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(cbbukhoa, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addGroup(qlgvCreate1Layout.createSequentialGroup()
                        .addGap(3, 3, 3)
                        .addComponent(jLabel137))
                    .addGroup(qlgvCreate1Layout.createSequentialGroup()
                        .addGap(3, 3, 3)
                        .addComponent(jLabel139)))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(qlgvCreate1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(qlgvCreate1Layout.createSequentialGroup()
                        .addGap(4, 4, 4)
                        .addGroup(qlgvCreate1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(qlgvCreate1Layout.createSequentialGroup()
                                .addGap(2, 2, 2)
                                .addComponent(jLabel138))
                            .addGroup(qlgvCreate1Layout.createSequentialGroup()
                                .addGap(4, 4, 4)
                                .addComponent(jLabel140))))
                    .addGroup(qlgvCreate1Layout.createSequentialGroup()
                        .addGap(5, 5, 5)
                        .addComponent(dateungaysinh, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(qlgvCreate1Layout.createSequentialGroup()
                        .addGap(4, 4, 4)
                        .addComponent(txtudantoc, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(qlgvCreate1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(qlgvCreate1Layout.createSequentialGroup()
                        .addGap(1, 1, 1)
                        .addComponent(jLabel141))
                    .addGroup(qlgvCreate1Layout.createSequentialGroup()
                        .addGap(3, 3, 3)
                        .addComponent(jLabel142))
                    .addComponent(txtuquoctich, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(txtuemail, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(7, 7, 7)
                .addGroup(qlgvCreate1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(qlgvCreate1Layout.createSequentialGroup()
                        .addGap(4, 4, 4)
                        .addComponent(jLabel143))
                    .addGroup(qlgvCreate1Layout.createSequentialGroup()
                        .addGap(3, 3, 3)
                        .addComponent(jLabel144))
                    .addComponent(txtudienthoai, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(txtucmnd, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(qlgvCreate1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(txtudiachi, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel145, javax.swing.GroupLayout.PREFERRED_SIZE, 20, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(7, 7, 7)
                .addGroup(qlgvCreate1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(txtuhocvi, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel146)
                    .addComponent(jLabel175)
                    .addComponent(cbbuTrangThai, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(qlgvCreate1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(btnxemprofile1)
                    .addComponent(btnuCapNhat))
                .addGap(11, 11, 11))
        );

        qlk8.add(qlgvCreate1, "card2");

        qlgvEdit1.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Thêm user", javax.swing.border.TitledBorder.LEFT, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Tahoma", 1, 12))); // NOI18N

        jLabel147.setText("GiangVienID: ");

        btngvCapnhat1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Images/update.png"))); // NOI18N
        btngvCapnhat1.setText("Thêm");
        btngvCapnhat1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btngvCapnhat1ActionPerformed(evt);
            }
        });

        jLabel148.setText("Họ tên: ");

        cbbugioitinhthem.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Nam", "Nữ" }));

        jLabel178.setText("Giới tính: ");

        jLabel179.setText("Role: ");

        jLabel180.setText("Retype Pasword:");

        jLabel182.setText("Khoa: ");

        jLabel183.setText("Pasword: ");

        jLabel184.setText("Trạng thái: ");

        cbbutrangthai.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Enable", "Disable" }));
        cbbutrangthai.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                cbbutrangthaiActionPerformed(evt);
            }
        });

        txtukhoa.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                txtukhoaActionPerformed(evt);
            }
        });

        cbburole.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Admin", "Staff" }));

        javax.swing.GroupLayout qlgvEdit1Layout = new javax.swing.GroupLayout(qlgvEdit1);
        qlgvEdit1.setLayout(qlgvEdit1Layout);
        qlgvEdit1Layout.setHorizontalGroup(
            qlgvEdit1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(qlgvEdit1Layout.createSequentialGroup()
                .addGroup(qlgvEdit1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(qlgvEdit1Layout.createSequentialGroup()
                        .addGap(10, 10, 10)
                        .addGroup(qlgvEdit1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(qlgvEdit1Layout.createSequentialGroup()
                                .addGap(1, 1, 1)
                                .addComponent(jLabel147))
                            .addComponent(jLabel182)
                            .addComponent(jLabel183)
                            .addComponent(jLabel179)))
                    .addGroup(qlgvEdit1Layout.createSequentialGroup()
                        .addContainerGap()
                        .addComponent(jLabel184))
                    .addGroup(qlgvEdit1Layout.createSequentialGroup()
                        .addContainerGap()
                        .addComponent(jLabel180)))
                .addGap(15, 15, 15)
                .addGroup(qlgvEdit1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addGroup(qlgvEdit1Layout.createSequentialGroup()
                        .addGroup(qlgvEdit1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                            .addComponent(retypepass, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 129, Short.MAX_VALUE)
                            .addComponent(pass, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 129, Short.MAX_VALUE)
                            .addComponent(txtukhoa, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 129, Short.MAX_VALUE)
                            .addGroup(qlgvEdit1Layout.createSequentialGroup()
                                .addComponent(txtugvidthem, javax.swing.GroupLayout.DEFAULT_SIZE, 71, Short.MAX_VALUE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(jLabel148)
                                .addGap(15, 15, 15)))
                        .addGroup(qlgvEdit1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, qlgvEdit1Layout.createSequentialGroup()
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(jLabel178)
                                .addGap(18, 18, 18)
                                .addComponent(cbbugioitinhthem, javax.swing.GroupLayout.PREFERRED_SIZE, 86, javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addGroup(qlgvEdit1Layout.createSequentialGroup()
                                .addGap(6, 6, 6)
                                .addComponent(txtuhoten2, javax.swing.GroupLayout.PREFERRED_SIZE, 179, javax.swing.GroupLayout.PREFERRED_SIZE)))
                        .addGap(100, 100, 100))
                    .addGroup(javax.swing.GroupLayout.Alignment.LEADING, qlgvEdit1Layout.createSequentialGroup()
                        .addGroup(qlgvEdit1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                            .addComponent(cbburole, javax.swing.GroupLayout.Alignment.LEADING, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .addComponent(cbbutrangthai, javax.swing.GroupLayout.Alignment.LEADING, 0, 65, Short.MAX_VALUE))
                        .addContainerGap(349, Short.MAX_VALUE))))
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, qlgvEdit1Layout.createSequentialGroup()
                .addContainerGap(191, Short.MAX_VALUE)
                .addComponent(btngvCapnhat1)
                .addGap(236, 236, 236))
        );
        qlgvEdit1Layout.setVerticalGroup(
            qlgvEdit1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(qlgvEdit1Layout.createSequentialGroup()
                .addGap(1, 1, 1)
                .addGroup(qlgvEdit1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel147)
                    .addComponent(txtugvidthem, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(txtuhoten2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel148))
                .addGap(4, 4, 4)
                .addGroup(qlgvEdit1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(qlgvEdit1Layout.createSequentialGroup()
                        .addGroup(qlgvEdit1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jLabel182)
                            .addComponent(txtukhoa, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(qlgvEdit1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jLabel183)
                            .addComponent(pass, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addGap(11, 11, 11)
                        .addGroup(qlgvEdit1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jLabel180)
                            .addComponent(retypepass, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addGap(8, 8, 8)
                        .addGroup(qlgvEdit1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jLabel179)
                            .addComponent(cbburole, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                    .addGroup(qlgvEdit1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                        .addComponent(cbbugioitinhthem, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addComponent(jLabel178)))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(qlgvEdit1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabel184)
                    .addComponent(cbbutrangthai, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(15, 15, 15)
                .addComponent(btngvCapnhat1)
                .addContainerGap(20, Short.MAX_VALUE))
        );

        qlk8.add(qlgvEdit1, "card3");

        qlgvEditUser.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Sửa user", javax.swing.border.TitledBorder.LEFT, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Tahoma", 1, 12))); // NOI18N

        jLabel176.setText("GiangVienID: ");

        btngvCapnhat2.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Images/update.png"))); // NOI18N
        btngvCapnhat2.setText("Cập nhật");
        btngvCapnhat2.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btngvCapnhat2ActionPerformed(evt);
            }
        });

        jLabel177.setText("Họ tên: ");

        jLabel185.setText("Role: ");

        jLabel187.setText("Retype Pasword:");

        jLabel189.setText("Pasword: ");

        jLabel190.setText("Trạng thái: ");

        cbbutrangthai1.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Enable", "Disable" }));

        cbburole1.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Admin", "Staff" }));

        javax.swing.GroupLayout qlgvEditUserLayout = new javax.swing.GroupLayout(qlgvEditUser);
        qlgvEditUser.setLayout(qlgvEditUserLayout);
        qlgvEditUserLayout.setHorizontalGroup(
            qlgvEditUserLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(qlgvEditUserLayout.createSequentialGroup()
                .addGap(10, 10, 10)
                .addGroup(qlgvEditUserLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(btngvCapnhat2)
                    .addGroup(qlgvEditUserLayout.createSequentialGroup()
                        .addGroup(qlgvEditUserLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jLabel185)
                            .addComponent(jLabel189)
                            .addComponent(jLabel176))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(qlgvEditUserLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                            .addComponent(cbburole1, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .addComponent(txtugvid, javax.swing.GroupLayout.DEFAULT_SIZE, 111, Short.MAX_VALUE)
                            .addComponent(pass1))
                        .addGap(18, 18, 18)
                        .addGroup(qlgvEditUserLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jLabel187)
                            .addComponent(jLabel177)
                            .addComponent(jLabel190))))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(qlgvEditUserLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addComponent(retypepass1)
                    .addComponent(cbbutrangthai1, javax.swing.GroupLayout.PREFERRED_SIZE, 77, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(txtuhoten3, javax.swing.GroupLayout.PREFERRED_SIZE, 124, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap(101, Short.MAX_VALUE))
        );
        qlgvEditUserLayout.setVerticalGroup(
            qlgvEditUserLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(qlgvEditUserLayout.createSequentialGroup()
                .addGroup(qlgvEditUserLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(qlgvEditUserLayout.createSequentialGroup()
                        .addGap(1, 1, 1)
                        .addGroup(qlgvEditUserLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(txtugvid, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jLabel176)))
                    .addGroup(qlgvEditUserLayout.createSequentialGroup()
                        .addGroup(qlgvEditUserLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(txtuhoten3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jLabel177))
                        .addGap(10, 10, 10)
                        .addGroup(qlgvEditUserLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jLabel187)
                            .addComponent(pass1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jLabel189)
                            .addComponent(retypepass1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addGroup(qlgvEditUserLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(cbbutrangthai1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addGroup(qlgvEditUserLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                .addComponent(jLabel190)
                                .addComponent(cbburole1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addComponent(jLabel185)))))
                .addGap(33, 33, 33)
                .addComponent(btngvCapnhat2)
                .addContainerGap(82, Short.MAX_VALUE))
        );

        qlk8.add(qlgvEditUser, "card3");

        javax.swing.GroupLayout quanlikhoa9Layout = new javax.swing.GroupLayout(quanlikhoa9);
        quanlikhoa9.setLayout(quanlikhoa9Layout);
        quanlikhoa9Layout.setHorizontalGroup(
            quanlikhoa9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(quanlikhoa9Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(qlkthaotac9, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(qlk8, javax.swing.GroupLayout.PREFERRED_SIZE, 538, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );
        quanlikhoa9Layout.setVerticalGroup(
            quanlikhoa9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(quanlikhoa9Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(quanlikhoa9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                    .addComponent(qlkthaotac9, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(qlk8, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 263, Short.MAX_VALUE))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        jLabel186.setText("Tìm kiếm: ");

        txtuser.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyPressed(java.awt.event.KeyEvent evt) {
                txtuserKeyPressed(evt);
            }
            public void keyReleased(java.awt.event.KeyEvent evt) {
                txtuserKeyReleased(evt);
            }
        });

        tableGiangVien1.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null}
            },
            new String [] {
                "Title 1", "Title 2", "Title 3", "Title 4"
            }
        ));
        tableGiangVien1.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                tableGiangVien1MouseClicked(evt);
            }
        });
        jScrollPane15.setViewportView(tableGiangVien1);

        rduser.setText("Danh sách users");
        rduser.addItemListener(new java.awt.event.ItemListener() {
            public void itemStateChanged(java.awt.event.ItemEvent evt) {
                rduserItemStateChanged(evt);
            }
        });

        rdgv.setText("Danh sách giảng viên");
        rdgv.addItemListener(new java.awt.event.ItemListener() {
            public void itemStateChanged(java.awt.event.ItemEvent evt) {
                rdgvItemStateChanged(evt);
            }
        });

        javax.swing.GroupLayout jPanel32Layout = new javax.swing.GroupLayout(jPanel32);
        jPanel32.setLayout(jPanel32Layout);
        jPanel32Layout.setHorizontalGroup(
            jPanel32Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel32Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel32Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel32Layout.createSequentialGroup()
                        .addComponent(jScrollPane15, javax.swing.GroupLayout.DEFAULT_SIZE, 693, Short.MAX_VALUE)
                        .addContainerGap())
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel32Layout.createSequentialGroup()
                        .addComponent(jLabel186)
                        .addGap(32, 32, 32)
                        .addComponent(txtuser, javax.swing.GroupLayout.PREFERRED_SIZE, 423, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(98, 98, 98))))
            .addGroup(jPanel32Layout.createSequentialGroup()
                .addGap(26, 26, 26)
                .addComponent(rduser)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(rdgv)
                .addContainerGap(453, Short.MAX_VALUE))
        );
        jPanel32Layout.setVerticalGroup(
            jPanel32Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel32Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel32Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(rduser)
                    .addComponent(rdgv))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(jPanel32Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(txtuser, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel186, javax.swing.GroupLayout.PREFERRED_SIZE, 20, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(jScrollPane15, javax.swing.GroupLayout.PREFERRED_SIZE, 207, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(24, Short.MAX_VALUE))
        );

        javax.swing.GroupLayout jPanel23Layout = new javax.swing.GroupLayout(jPanel23);
        jPanel23.setLayout(jPanel23Layout);
        jPanel23Layout.setHorizontalGroup(
            jPanel23Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel23Layout.createSequentialGroup()
                .addGroup(jPanel23Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel23Layout.createSequentialGroup()
                        .addGap(10, 10, 10)
                        .addComponent(jPanel32, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                    .addComponent(quanlikhoa9, javax.swing.GroupLayout.PREFERRED_SIZE, 713, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap())
        );
        jPanel23Layout.setVerticalGroup(
            jPanel23Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel23Layout.createSequentialGroup()
                .addComponent(quanlikhoa9, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jPanel32, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addGap(34, 34, 34))
        );

        javax.swing.GroupLayout jPanel14Layout = new javax.swing.GroupLayout(jPanel14);
        jPanel14.setLayout(jPanel14Layout);
        jPanel14Layout.setHorizontalGroup(
            jPanel14Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel14Layout.createSequentialGroup()
                .addComponent(jPanel23, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addContainerGap())
        );
        jPanel14Layout.setVerticalGroup(
            jPanel14Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel14Layout.createSequentialGroup()
                .addComponent(jPanel23, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addContainerGap())
        );

        jTabbedPane1.addTab("", new javax.swing.ImageIcon(getClass().getResource("/Images/quan li user.png")), jPanel14); // NOI18N

        pnQuanLiKhoa.setAlignmentX(0.0F);
        pnQuanLiKhoa.setAlignmentY(0.0F);
        pnQuanLiKhoa.setAutoscrolls(true);
        pnQuanLiKhoa.addComponentListener(new java.awt.event.ComponentAdapter() {
            public void componentShown(java.awt.event.ComponentEvent evt) {
                pnQuanLiKhoaComponentShown(evt);
            }
        });

        quanlikhoa.setAlignmentX(0.0F);
        quanlikhoa.setAlignmentY(0.0F);

        qlkthaotac.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Thao tác", javax.swing.border.TitledBorder.LEFT, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Tahoma", 1, 12))); // NOI18N
        qlkthaotac.setPreferredSize(new java.awt.Dimension(219, 242));

        btnKDelete.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Images/Delete.png"))); // NOI18N
        btnKDelete.setText("Xóa");
        btnKDelete.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnKDeleteActionPerformed(evt);
            }
        });

        btnCreate1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Images/add.png"))); // NOI18N
        btnCreate1.setText("Thêm mới");
        btnCreate1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnCreate1ActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout qlkthaotacLayout = new javax.swing.GroupLayout(qlkthaotac);
        qlkthaotac.setLayout(qlkthaotacLayout);
        qlkthaotacLayout.setHorizontalGroup(
            qlkthaotacLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(qlkthaotacLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(qlkthaotacLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                    .addComponent(btnKDelete, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(btnCreate1, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addContainerGap(29, Short.MAX_VALUE))
        );
        qlkthaotacLayout.setVerticalGroup(
            qlkthaotacLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(qlkthaotacLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(btnCreate1)
                .addGap(18, 18, 18)
                .addComponent(btnKDelete)
                .addContainerGap(24, Short.MAX_VALUE))
        );

        qlk.setPreferredSize(new java.awt.Dimension(508, 242));
        qlk.setLayout(new java.awt.CardLayout());

        qlkCreate.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Thêm mới khoa", javax.swing.border.TitledBorder.LEFT, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Tahoma", 1, 12))); // NOI18N

        jLabel2.setText("Tên khoa: ");

        jLabel5.setText("Trạng thái: ");

        btnKResetT.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Images/refresh.png"))); // NOI18N
        btnKResetT.setText("Reset");
        btnKResetT.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnKResetTActionPerformed(evt);
            }
        });

        cbbKTrangThaiT.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Enable", "Disable" }));

        btnKThemmoiT.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Images/add.png"))); // NOI18N
        btnKThemmoiT.setText("Thêm mới");
        btnKThemmoiT.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnKThemmoiTActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout qlkCreateLayout = new javax.swing.GroupLayout(qlkCreate);
        qlkCreate.setLayout(qlkCreateLayout);
        qlkCreateLayout.setHorizontalGroup(
            qlkCreateLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(qlkCreateLayout.createSequentialGroup()
                .addGap(85, 85, 85)
                .addGroup(qlkCreateLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(qlkCreateLayout.createSequentialGroup()
                        .addComponent(jLabel5)
                        .addGap(13, 13, 13)
                        .addComponent(cbbKTrangThaiT, javax.swing.GroupLayout.PREFERRED_SIZE, 86, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(qlkCreateLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                        .addGroup(qlkCreateLayout.createSequentialGroup()
                            .addComponent(btnKThemmoiT, javax.swing.GroupLayout.PREFERRED_SIZE, 134, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addGap(30, 30, 30)
                            .addComponent(btnKResetT, javax.swing.GroupLayout.PREFERRED_SIZE, 105, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addGroup(qlkCreateLayout.createSequentialGroup()
                            .addComponent(jLabel2)
                            .addGap(18, 18, 18)
                            .addComponent(txtKTenKhoaT, javax.swing.GroupLayout.PREFERRED_SIZE, 248, javax.swing.GroupLayout.PREFERRED_SIZE))))
                .addContainerGap(129, Short.MAX_VALUE))
        );
        qlkCreateLayout.setVerticalGroup(
            qlkCreateLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(qlkCreateLayout.createSequentialGroup()
                .addGroup(qlkCreateLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel2)
                    .addComponent(txtKTenKhoaT, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGroup(qlkCreateLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(qlkCreateLayout.createSequentialGroup()
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(jLabel5))
                    .addGroup(qlkCreateLayout.createSequentialGroup()
                        .addGap(11, 11, 11)
                        .addComponent(cbbKTrangThaiT, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addGap(18, 18, 18)
                .addGroup(qlkCreateLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(btnKResetT)
                    .addComponent(btnKThemmoiT))
                .addContainerGap(17, Short.MAX_VALUE))
        );

        qlk.add(qlkCreate, "card2");

        qlkEdit.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Cập nhật thông tin khoa", javax.swing.border.TitledBorder.LEFT, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Tahoma", 1, 12))); // NOI18N

        jLabel3.setText("KhoaID: ");

        jLabel6.setText("Tên khoa: ");

        cbbKTrangThai2.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Enable", "Disable" }));

        jLabel7.setText("Trạng thái: ");

        btnKCapNhat.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Images/update.png"))); // NOI18N
        btnKCapNhat.setText("Cập nhật");
        btnKCapNhat.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnKCapNhatActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout qlkEditLayout = new javax.swing.GroupLayout(qlkEdit);
        qlkEdit.setLayout(qlkEditLayout);
        qlkEditLayout.setHorizontalGroup(
            qlkEditLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(qlkEditLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(qlkEditLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(qlkEditLayout.createSequentialGroup()
                        .addGroup(qlkEditLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jLabel3)
                            .addComponent(jLabel7))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(qlkEditLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(cbbKTrangThai2, javax.swing.GroupLayout.PREFERRED_SIZE, 83, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addGroup(qlkEditLayout.createSequentialGroup()
                                .addComponent(txtKKhoaID2, javax.swing.GroupLayout.PREFERRED_SIZE, 83, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addGap(18, 18, 18)
                                .addComponent(jLabel6)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(txtKTenKhoa2, javax.swing.GroupLayout.DEFAULT_SIZE, 295, Short.MAX_VALUE)))
                        .addContainerGap())
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, qlkEditLayout.createSequentialGroup()
                        .addComponent(btnKCapNhat)
                        .addGap(225, 225, 225))))
        );
        qlkEditLayout.setVerticalGroup(
            qlkEditLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(qlkEditLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(qlkEditLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel3)
                    .addComponent(txtKKhoaID2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel6)
                    .addComponent(txtKTenKhoa2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(qlkEditLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel7)
                    .addComponent(cbbKTrangThai2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(btnKCapNhat)
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        qlk.add(qlkEdit, "card3");

        javax.swing.GroupLayout quanlikhoaLayout = new javax.swing.GroupLayout(quanlikhoa);
        quanlikhoa.setLayout(quanlikhoaLayout);
        quanlikhoaLayout.setHorizontalGroup(
            quanlikhoaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(quanlikhoaLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(qlkthaotac, javax.swing.GroupLayout.PREFERRED_SIZE, 160, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(qlk, javax.swing.GroupLayout.DEFAULT_SIZE, 547, Short.MAX_VALUE)
                .addContainerGap())
        );
        quanlikhoaLayout.setVerticalGroup(
            quanlikhoaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(quanlikhoaLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(quanlikhoaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(qlk, javax.swing.GroupLayout.Alignment.LEADING, 0, 0, Short.MAX_VALUE)
                    .addComponent(qlkthaotac, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.PREFERRED_SIZE, 150, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap())
        );

        tableKhoa.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null}
            },
            new String [] {
                "Title 1", "Title 2", "Title 3", "Title 4"
            }
        ));
        tableKhoa.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                tableKhoaMouseClicked(evt);
            }
        });
        jScrollPane1.setViewportView(tableKhoa);

        jLabel8.setText("Tìm kiếm:  ");

        txtdasdasdas1.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyPressed(java.awt.event.KeyEvent evt) {
                txtdasdasdas1KeyPressed(evt);
            }
            public void keyReleased(java.awt.event.KeyEvent evt) {
                txtdasdasdas1KeyReleased(evt);
            }
        });

        javax.swing.GroupLayout pnQuanLiKhoaLayout = new javax.swing.GroupLayout(pnQuanLiKhoa);
        pnQuanLiKhoa.setLayout(pnQuanLiKhoaLayout);
        pnQuanLiKhoaLayout.setHorizontalGroup(
            pnQuanLiKhoaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnQuanLiKhoaLayout.createSequentialGroup()
                .addGroup(pnQuanLiKhoaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(pnQuanLiKhoaLayout.createSequentialGroup()
                        .addGap(156, 156, 156)
                        .addComponent(jLabel8)
                        .addGap(18, 18, 18)
                        .addComponent(txtdasdasdas1, javax.swing.GroupLayout.PREFERRED_SIZE, 362, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addComponent(quanlikhoa, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addGroup(pnQuanLiKhoaLayout.createSequentialGroup()
                        .addGap(10, 10, 10)
                        .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 703, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addContainerGap())
        );
        pnQuanLiKhoaLayout.setVerticalGroup(
            pnQuanLiKhoaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnQuanLiKhoaLayout.createSequentialGroup()
                .addComponent(quanlikhoa, javax.swing.GroupLayout.PREFERRED_SIZE, 165, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(18, 18, 18)
                .addGroup(pnQuanLiKhoaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel8)
                    .addComponent(txtdasdasdas1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(18, 18, 18)
                .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 383, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(36, Short.MAX_VALUE))
        );

        jTabbedPane1.addTab("", new javax.swing.ImageIcon(getClass().getResource("/Images/QUAN LY KHOA.png")), pnQuanLiKhoa); // NOI18N

        jPanel2.addComponentListener(new java.awt.event.ComponentAdapter() {
            public void componentShown(java.awt.event.ComponentEvent evt) {
                jPanel2ComponentShown(evt);
            }
        });

        jPanel15.addComponentListener(new java.awt.event.ComponentAdapter() {
            public void componentShown(java.awt.event.ComponentEvent evt) {
                jPanel15ComponentShown(evt);
            }
        });

        quanlikhoa2.setAlignmentX(0.0F);
        quanlikhoa2.setAlignmentY(0.0F);

        qlkthaotac2.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Thao tác", javax.swing.border.TitledBorder.LEFT, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Tahoma", 1, 12))); // NOI18N
        qlkthaotac2.setPreferredSize(new java.awt.Dimension(219, 150));

        btnKHDelete.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Images/Delete.png"))); // NOI18N
        btnKHDelete.setText("Xóa");
        btnKHDelete.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnKHDeleteActionPerformed(evt);
            }
        });

        btnCreate3.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Images/add.png"))); // NOI18N
        btnCreate3.setText("Thêm mới");
        btnCreate3.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnCreate3ActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout qlkthaotac2Layout = new javax.swing.GroupLayout(qlkthaotac2);
        qlkthaotac2.setLayout(qlkthaotac2Layout);
        qlkthaotac2Layout.setHorizontalGroup(
            qlkthaotac2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(qlkthaotac2Layout.createSequentialGroup()
                .addGap(21, 21, 21)
                .addGroup(qlkthaotac2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                    .addComponent(btnKHDelete, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(btnCreate3, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addContainerGap(35, Short.MAX_VALUE))
        );
        qlkthaotac2Layout.setVerticalGroup(
            qlkthaotac2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(qlkthaotac2Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(btnCreate3)
                .addGap(18, 18, 18)
                .addComponent(btnKHDelete)
                .addContainerGap(24, Short.MAX_VALUE))
        );

        qlk1.setLayout(new java.awt.CardLayout());

        qlkhCreate.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Thêm mới khóa học", javax.swing.border.TitledBorder.LEFT, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Tahoma", 1, 12))); // NOI18N
        qlkhCreate.setPreferredSize(new java.awt.Dimension(508, 242));

        jLabel9.setText("Tên khóa học: ");

        jButton4.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Images/refresh.png"))); // NOI18N
        jButton4.setText("Reset");

        btnCreate4.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Images/add.png"))); // NOI18N
        btnCreate4.setText("Thêm mới");
        btnCreate4.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnCreate4ActionPerformed(evt);
            }
        });

        jLabel16.setText("Khoa: ");

        cbbKHKhoa.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Item 1", "Item 2", "Item 3", "Item 4" }));

        javax.swing.GroupLayout qlkhCreateLayout = new javax.swing.GroupLayout(qlkhCreate);
        qlkhCreate.setLayout(qlkhCreateLayout);
        qlkhCreateLayout.setHorizontalGroup(
            qlkhCreateLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(qlkhCreateLayout.createSequentialGroup()
                .addGroup(qlkhCreateLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(qlkhCreateLayout.createSequentialGroup()
                        .addGap(72, 72, 72)
                        .addGroup(qlkhCreateLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jLabel9)
                            .addComponent(jLabel16))
                        .addGap(18, 18, 18)
                        .addGroup(qlkhCreateLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                            .addComponent(cbbKHKhoa, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .addComponent(txtKHTenKhoaHoc, javax.swing.GroupLayout.DEFAULT_SIZE, 208, Short.MAX_VALUE)))
                    .addGroup(qlkhCreateLayout.createSequentialGroup()
                        .addGap(102, 102, 102)
                        .addComponent(btnCreate4, javax.swing.GroupLayout.PREFERRED_SIZE, 113, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(18, 18, 18)
                        .addComponent(jButton4, javax.swing.GroupLayout.PREFERRED_SIZE, 105, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addContainerGap(145, Short.MAX_VALUE))
        );
        qlkhCreateLayout.setVerticalGroup(
            qlkhCreateLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(qlkhCreateLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(qlkhCreateLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel9)
                    .addComponent(txtKHTenKhoaHoc, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(qlkhCreateLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(cbbKHKhoa, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel16))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(qlkhCreateLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(btnCreate4, javax.swing.GroupLayout.PREFERRED_SIZE, 41, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jButton4))
                .addGap(13, 13, 13))
        );

        qlk1.add(qlkhCreate, "card2");

        qlkhEdit.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Cập nhật thông tin khóa học", javax.swing.border.TitledBorder.LEFT, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Tahoma", 1, 12))); // NOI18N
        qlkhEdit.setPreferredSize(new java.awt.Dimension(550, 153));

        jLabel11.setText("KhoaHocID: ");

        jLabel12.setText("Tên khóa học: ");

        btnKHCapNhat.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Images/update.png"))); // NOI18N
        btnKHCapNhat.setText("Cập nhật");
        btnKHCapNhat.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnKHCapNhatActionPerformed(evt);
            }
        });

        jLabel17.setText("Khoa: ");

        cbbKHKhoa2.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Item 1", "Item 2", "Item 3", "Item 4" }));

        javax.swing.GroupLayout qlkhEditLayout = new javax.swing.GroupLayout(qlkhEdit);
        qlkhEdit.setLayout(qlkhEditLayout);
        qlkhEditLayout.setHorizontalGroup(
            qlkhEditLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(qlkhEditLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(qlkhEditLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabel11)
                    .addComponent(jLabel17))
                .addGap(6, 6, 6)
                .addGroup(qlkhEditLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(qlkhEditLayout.createSequentialGroup()
                        .addComponent(txtKHKhoaHocID, javax.swing.GroupLayout.PREFERRED_SIZE, 98, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(18, 18, 18)
                        .addComponent(jLabel12)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(txtKHTenKhoaHoc2, javax.swing.GroupLayout.DEFAULT_SIZE, 229, Short.MAX_VALUE)
                        .addGap(12, 12, 12))
                    .addGroup(qlkhEditLayout.createSequentialGroup()
                        .addComponent(cbbKHKhoa2, javax.swing.GroupLayout.PREFERRED_SIZE, 339, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addContainerGap())))
            .addGroup(qlkhEditLayout.createSequentialGroup()
                .addGap(176, 176, 176)
                .addComponent(btnKHCapNhat)
                .addContainerGap(225, Short.MAX_VALUE))
        );
        qlkhEditLayout.setVerticalGroup(
            qlkhEditLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(qlkhEditLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(qlkhEditLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel11)
                    .addComponent(txtKHKhoaHocID, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel12)
                    .addComponent(txtKHTenKhoaHoc2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(qlkhEditLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel17)
                    .addComponent(cbbKHKhoa2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(btnKHCapNhat)
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        qlk1.add(qlkhEdit, "card3");

        javax.swing.GroupLayout quanlikhoa2Layout = new javax.swing.GroupLayout(quanlikhoa2);
        quanlikhoa2.setLayout(quanlikhoa2Layout);
        quanlikhoa2Layout.setHorizontalGroup(
            quanlikhoa2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, quanlikhoa2Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(qlkthaotac2, javax.swing.GroupLayout.DEFAULT_SIZE, 177, Short.MAX_VALUE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(qlk1, javax.swing.GroupLayout.PREFERRED_SIZE, 530, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap())
        );
        quanlikhoa2Layout.setVerticalGroup(
            quanlikhoa2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(quanlikhoa2Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(quanlikhoa2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(qlk1, javax.swing.GroupLayout.Alignment.LEADING, 0, 0, Short.MAX_VALUE)
                    .addComponent(qlkthaotac2, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(11, 11, 11))
        );

        tableKhoaHoc.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null}
            },
            new String [] {
                "Title 1", "Title 2", "Title 3", "Title 4"
            }
        ));
        tableKhoaHoc.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                tableKhoaHocMouseClicked(evt);
            }
        });
        jScrollPane2.setViewportView(tableKhoaHoc);

        txtSearchKhoaHoc.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyPressed(java.awt.event.KeyEvent evt) {
                txtSearchKhoaHocKeyPressed(evt);
            }
            public void keyReleased(java.awt.event.KeyEvent evt) {
                txtSearchKhoaHocKeyReleased(evt);
            }
        });

        jLabel14.setText("Tìm kiếm: ");

        javax.swing.GroupLayout jPanel15Layout = new javax.swing.GroupLayout(jPanel15);
        jPanel15.setLayout(jPanel15Layout);
        jPanel15Layout.setHorizontalGroup(
            jPanel15Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel15Layout.createSequentialGroup()
                .addGap(109, 109, 109)
                .addComponent(jLabel14)
                .addGap(6, 6, 6)
                .addComponent(txtSearchKhoaHoc, javax.swing.GroupLayout.PREFERRED_SIZE, 392, javax.swing.GroupLayout.PREFERRED_SIZE))
            .addGroup(jPanel15Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jScrollPane2, javax.swing.GroupLayout.PREFERRED_SIZE, 693, javax.swing.GroupLayout.PREFERRED_SIZE))
            .addComponent(quanlikhoa2, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
        );
        jPanel15Layout.setVerticalGroup(
            jPanel15Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel15Layout.createSequentialGroup()
                .addComponent(quanlikhoa2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(jPanel15Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel14)
                    .addComponent(txtSearchKhoaHoc, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(18, 18, 18)
                .addComponent(jScrollPane2, javax.swing.GroupLayout.PREFERRED_SIZE, 387, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(21, Short.MAX_VALUE))
        );

        javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);
        jPanel2.setLayout(jPanel2Layout);
        jPanel2Layout.setHorizontalGroup(
            jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel2Layout.createSequentialGroup()
                .addComponent(jPanel15, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addContainerGap())
        );
        jPanel2Layout.setVerticalGroup(
            jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel2Layout.createSequentialGroup()
                .addComponent(jPanel15, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addContainerGap())
        );

        jTabbedPane1.addTab("", new javax.swing.ImageIcon(getClass().getResource("/Images/QUAN LY KHOA HOC.png")), jPanel2); // NOI18N

        jPanel3.addComponentListener(new java.awt.event.ComponentAdapter() {
            public void componentShown(java.awt.event.ComponentEvent evt) {
                jPanel3ComponentShown(evt);
            }
        });

        jPanel16.addComponentListener(new java.awt.event.ComponentAdapter() {
            public void componentShown(java.awt.event.ComponentEvent evt) {
                jPanel16ComponentShown(evt);
            }
        });

        quanlikhoa3.setAlignmentX(0.0F);
        quanlikhoa3.setAlignmentY(0.0F);

        qlkthaotac3.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Thao tác", javax.swing.border.TitledBorder.LEFT, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Tahoma", 1, 12))); // NOI18N
        qlkthaotac3.setPreferredSize(new java.awt.Dimension(219, 257));

        btnDelete7.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Images/Delete.png"))); // NOI18N
        btnDelete7.setText("Xóa");
        btnDelete7.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnDelete7ActionPerformed(evt);
            }
        });

        btnCreate5.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Images/add.png"))); // NOI18N
        btnCreate5.setText("Thêm mới");
        btnCreate5.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnCreate5ActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout qlkthaotac3Layout = new javax.swing.GroupLayout(qlkthaotac3);
        qlkthaotac3.setLayout(qlkthaotac3Layout);
        qlkthaotac3Layout.setHorizontalGroup(
            qlkthaotac3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(qlkthaotac3Layout.createSequentialGroup()
                .addGap(17, 17, 17)
                .addGroup(qlkthaotac3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(btnCreate5, javax.swing.GroupLayout.DEFAULT_SIZE, 117, Short.MAX_VALUE)
                    .addComponent(btnDelete7, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 117, Short.MAX_VALUE))
                .addContainerGap())
        );
        qlkthaotac3Layout.setVerticalGroup(
            qlkthaotac3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(qlkthaotac3Layout.createSequentialGroup()
                .addComponent(btnCreate5)
                .addGap(27, 27, 27)
                .addComponent(btnDelete7)
                .addContainerGap(46, Short.MAX_VALUE))
        );

        qlk2.setLayout(new java.awt.CardLayout());

        qlkyCreate.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Thêm mới kỳ học", javax.swing.border.TitledBorder.LEFT, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Tahoma", 1, 12))); // NOI18N
        qlkyCreate.setPreferredSize(new java.awt.Dimension(650, 222));

        jLabel18.setText("Tên kỳ học:");

        bntReset.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Images/refresh.png"))); // NOI18N
        bntReset.setText("Reset");
        bntReset.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                bntResetActionPerformed(evt);
            }
        });

        btnCreate6.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Images/add.png"))); // NOI18N
        btnCreate6.setText("Thêm mới");
        btnCreate6.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnCreate6ActionPerformed(evt);
            }
        });

        jLabel20.setText("Khoa Hoc: ");

        cbbKYKhoaHoc1.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Item 1", "Item 2", "Item 3", "Item 4" }));

        jLabel29.setText("Ngày bắt đầu:");

        dateKyNBD1.setDateFormatString("dd/MM/yyyy");

        jLabel30.setText("Ngày kết thúc:");

        dateKYNKT1.setDateFormatString("dd/MM/yyyy");

        jLabel23.setText("Khoa: ");

        cbbKYKhoa1.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Item 1", "Item 2", "Item 3", "Item 4" }));
        cbbKYKhoa1.addItemListener(new java.awt.event.ItemListener() {
            public void itemStateChanged(java.awt.event.ItemEvent evt) {
                cbbKYKhoa1ItemStateChanged(evt);
            }
        });

        javax.swing.GroupLayout qlkyCreateLayout = new javax.swing.GroupLayout(qlkyCreate);
        qlkyCreate.setLayout(qlkyCreateLayout);
        qlkyCreateLayout.setHorizontalGroup(
            qlkyCreateLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(qlkyCreateLayout.createSequentialGroup()
                .addGroup(qlkyCreateLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(qlkyCreateLayout.createSequentialGroup()
                        .addGap(119, 119, 119)
                        .addComponent(btnCreate6)
                        .addGap(31, 31, 31)
                        .addComponent(bntReset, javax.swing.GroupLayout.PREFERRED_SIZE, 105, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(qlkyCreateLayout.createSequentialGroup()
                        .addContainerGap()
                        .addComponent(jLabel18)
                        .addGap(18, 18, 18)
                        .addGroup(qlkyCreateLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(qlkyCreateLayout.createSequentialGroup()
                                .addComponent(txtKYTenKy1, javax.swing.GroupLayout.PREFERRED_SIZE, 127, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                .addComponent(jLabel23)
                                .addGap(10, 10, 10)
                                .addComponent(cbbKYKhoa1, javax.swing.GroupLayout.PREFERRED_SIZE, 222, javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addComponent(cbbKYKhoaHoc1, javax.swing.GroupLayout.PREFERRED_SIZE, 126, javax.swing.GroupLayout.PREFERRED_SIZE)))
                    .addGroup(qlkyCreateLayout.createSequentialGroup()
                        .addContainerGap()
                        .addComponent(jLabel29)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(dateKyNBD1, javax.swing.GroupLayout.PREFERRED_SIZE, 128, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(jLabel30)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(dateKYNKT1, javax.swing.GroupLayout.PREFERRED_SIZE, 119, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(qlkyCreateLayout.createSequentialGroup()
                        .addContainerGap()
                        .addComponent(jLabel20)))
                .addContainerGap(23, Short.MAX_VALUE))
        );
        qlkyCreateLayout.setVerticalGroup(
            qlkyCreateLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(qlkyCreateLayout.createSequentialGroup()
                .addGroup(qlkyCreateLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel18)
                    .addComponent(txtKYTenKy1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel23)
                    .addComponent(cbbKYKhoa1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(10, 10, 10)
                .addGroup(qlkyCreateLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addGroup(qlkyCreateLayout.createSequentialGroup()
                        .addGroup(qlkyCreateLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jLabel20)
                            .addComponent(cbbKYKhoaHoc1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addGroup(qlkyCreateLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jLabel29)
                            .addGroup(qlkyCreateLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                                .addComponent(jLabel30)
                                .addComponent(dateKyNBD1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))))
                    .addComponent(dateKYNKT1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(qlkyCreateLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(bntReset)
                    .addComponent(btnCreate6))
                .addContainerGap())
        );

        qlk2.add(qlkyCreate, "card2");

        qlkyEdit.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Cập nhật thông tin kỳ học", javax.swing.border.TitledBorder.LEFT, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Tahoma", 1, 12))); // NOI18N

        jLabel21.setText("KyID: ");

        jLabel22.setText("Tên kỳ học: ");

        btnkyCapnhat.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Images/update.png"))); // NOI18N
        btnkyCapnhat.setText("Cập nhật");
        btnkyCapnhat.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnkyCapnhatActionPerformed(evt);
            }
        });

        jLabel24.setText("Khóa học: ");

        cbbKyKhoaHoc2.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Item 1", "Item 2", "Item 3", "Item 4" }));

        jLabel27.setText("Ngày bắt đầu: ");

        jLabel28.setText("Ngày kết thúc: ");

        cbbKYKhoa3.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Item 1", "Item 2", "Item 3", "Item 4" }));
        cbbKYKhoa3.addItemListener(new java.awt.event.ItemListener() {
            public void itemStateChanged(java.awt.event.ItemEvent evt) {
                cbbKYKhoa3ItemStateChanged(evt);
            }
        });

        jLabel26.setText("Khoa: ");

        javax.swing.GroupLayout qlkyEditLayout = new javax.swing.GroupLayout(qlkyEdit);
        qlkyEdit.setLayout(qlkyEditLayout);
        qlkyEditLayout.setHorizontalGroup(
            qlkyEditLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(qlkyEditLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(qlkyEditLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(qlkyEditLayout.createSequentialGroup()
                        .addGroup(qlkyEditLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jLabel27)
                            .addComponent(jLabel21)
                            .addComponent(jLabel26))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(qlkyEditLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(qlkyEditLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                                .addComponent(txtkykyid, javax.swing.GroupLayout.Alignment.TRAILING)
                                .addComponent(datenbd2, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 117, javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addComponent(cbbKYKhoa3, javax.swing.GroupLayout.PREFERRED_SIZE, 175, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addGroup(qlkyEditLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jLabel22)
                            .addComponent(jLabel28)
                            .addComponent(jLabel24))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addGroup(qlkyEditLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(datekynkt2, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 113, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(txtkytenky2, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 113, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(cbbKyKhoaHoc2, javax.swing.GroupLayout.PREFERRED_SIZE, 113, javax.swing.GroupLayout.PREFERRED_SIZE)))
                    .addGroup(qlkyEditLayout.createSequentialGroup()
                        .addGap(176, 176, 176)
                        .addComponent(btnkyCapnhat)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 163, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addGap(135, 135, 135))
        );
        qlkyEditLayout.setVerticalGroup(
            qlkyEditLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(qlkyEditLayout.createSequentialGroup()
                .addGroup(qlkyEditLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addGroup(qlkyEditLayout.createSequentialGroup()
                        .addGroup(qlkyEditLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jLabel21)
                            .addComponent(txtkykyid, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(qlkyEditLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                            .addComponent(datenbd2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jLabel27))
                        .addGap(8, 8, 8)
                        .addGroup(qlkyEditLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(cbbKYKhoa3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jLabel26)
                            .addComponent(jLabel24)))
                    .addGroup(qlkyEditLayout.createSequentialGroup()
                        .addGroup(qlkyEditLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                            .addComponent(txtkytenky2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jLabel22))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(qlkyEditLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                            .addComponent(jLabel28)
                            .addComponent(datekynkt2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addGap(8, 8, 8)
                        .addComponent(cbbKyKhoaHoc2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addComponent(btnkyCapnhat)
                .addGap(38, 38, 38))
        );

        qlk2.add(qlkyEdit, "card3");

        javax.swing.GroupLayout quanlikhoa3Layout = new javax.swing.GroupLayout(quanlikhoa3);
        quanlikhoa3.setLayout(quanlikhoa3Layout);
        quanlikhoa3Layout.setHorizontalGroup(
            quanlikhoa3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(quanlikhoa3Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(qlkthaotac3, javax.swing.GroupLayout.PREFERRED_SIZE, 160, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(qlk2, javax.swing.GroupLayout.PREFERRED_SIZE, 523, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );
        quanlikhoa3Layout.setVerticalGroup(
            quanlikhoa3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(quanlikhoa3Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(quanlikhoa3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(qlk2, javax.swing.GroupLayout.Alignment.LEADING, 0, 0, Short.MAX_VALUE)
                    .addComponent(qlkthaotac3, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.PREFERRED_SIZE, 170, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap(6, Short.MAX_VALUE))
        );

        tableKy.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null}
            },
            new String [] {
                "Title 1", "Title 2", "Title 3", "Title 4"
            }
        ));
        tableKy.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                tableKyMouseClicked(evt);
            }
        });
        jScrollPane3.setViewportView(tableKy);

        jLabel25.setText("Tìm kiếm: ");

        txtSearchKy.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyPressed(java.awt.event.KeyEvent evt) {
                txtSearchKyKeyPressed(evt);
            }
            public void keyReleased(java.awt.event.KeyEvent evt) {
                txtSearchKyKeyReleased(evt);
            }
        });

        javax.swing.GroupLayout jPanel16Layout = new javax.swing.GroupLayout(jPanel16);
        jPanel16.setLayout(jPanel16Layout);
        jPanel16Layout.setHorizontalGroup(
            jPanel16Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel16Layout.createSequentialGroup()
                .addGroup(jPanel16Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel16Layout.createSequentialGroup()
                        .addGap(149, 149, 149)
                        .addComponent(jLabel25)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(txtSearchKy, javax.swing.GroupLayout.PREFERRED_SIZE, 384, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addComponent(quanlikhoa3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addGroup(jPanel16Layout.createSequentialGroup()
                        .addContainerGap()
                        .addComponent(jScrollPane3, javax.swing.GroupLayout.PREFERRED_SIZE, 695, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );
        jPanel16Layout.setVerticalGroup(
            jPanel16Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel16Layout.createSequentialGroup()
                .addComponent(quanlikhoa3, javax.swing.GroupLayout.PREFERRED_SIZE, 187, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(jPanel16Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel25)
                    .addComponent(txtSearchKy, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(18, 18, 18)
                .addComponent(jScrollPane3, javax.swing.GroupLayout.PREFERRED_SIZE, 361, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(32, Short.MAX_VALUE))
        );

        javax.swing.GroupLayout jPanel3Layout = new javax.swing.GroupLayout(jPanel3);
        jPanel3.setLayout(jPanel3Layout);
        jPanel3Layout.setHorizontalGroup(
            jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel3Layout.createSequentialGroup()
                .addComponent(jPanel16, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(20, Short.MAX_VALUE))
        );
        jPanel3Layout.setVerticalGroup(
            jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel3Layout.createSequentialGroup()
                .addComponent(jPanel16, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addContainerGap())
        );

        jTabbedPane1.addTab("", new javax.swing.ImageIcon(getClass().getResource("/Images/QUAN LY KY HOC.png")), jPanel3); // NOI18N

        jPanel5.addComponentListener(new java.awt.event.ComponentAdapter() {
            public void componentShown(java.awt.event.ComponentEvent evt) {
                jPanel5ComponentShown(evt);
            }
        });

        quanlikhoa4.setAlignmentX(0.0F);
        quanlikhoa4.setAlignmentY(0.0F);

        qlkthaotac4.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Thao tác", javax.swing.border.TitledBorder.LEFT, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Tahoma", 1, 12))); // NOI18N

        btnDelete9.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Images/Delete.png"))); // NOI18N
        btnDelete9.setText("Xóa");
        btnDelete9.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnDelete9ActionPerformed(evt);
            }
        });

        btnCreate7.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Images/add.png"))); // NOI18N
        btnCreate7.setText("Thêm mới");
        btnCreate7.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnCreate7ActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout qlkthaotac4Layout = new javax.swing.GroupLayout(qlkthaotac4);
        qlkthaotac4.setLayout(qlkthaotac4Layout);
        qlkthaotac4Layout.setHorizontalGroup(
            qlkthaotac4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(qlkthaotac4Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(qlkthaotac4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                    .addComponent(btnDelete9, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(btnCreate7, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.PREFERRED_SIZE, 121, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap(17, Short.MAX_VALUE))
        );
        qlkthaotac4Layout.setVerticalGroup(
            qlkthaotac4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(qlkthaotac4Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(btnCreate7)
                .addGap(17, 17, 17)
                .addComponent(btnDelete9)
                .addContainerGap(29, Short.MAX_VALUE))
        );

        qlk3.setLayout(new java.awt.CardLayout());

        qllopCreate.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Thêm mới lớp học", javax.swing.border.TitledBorder.LEFT, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Tahoma", 1, 12))); // NOI18N

        jLabel31.setText("Tên lớp học: ");

        txtloptenlop1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                txtloptenlop1ActionPerformed(evt);
            }
        });

        btnlopreset.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Images/refresh.png"))); // NOI18N
        btnlopreset.setText("Reset");
        btnlopreset.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnlopresetActionPerformed(evt);
            }
        });

        btnCreate8.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Images/add.png"))); // NOI18N
        btnCreate8.setText("Thêm mới");
        btnCreate8.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnCreate8ActionPerformed(evt);
            }
        });

        jLabel33.setText("Khóa học: ");

        cbblopKhoaHoc1.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Item 1", "Item 2", "Item 3", "Item 4" }));

        jLabel156.setText("Khoa: ");

        cbblopKhoa1.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Item 1", "Item 2", "Item 3", "Item 4" }));
        cbblopKhoa1.addItemListener(new java.awt.event.ItemListener() {
            public void itemStateChanged(java.awt.event.ItemEvent evt) {
                cbblopKhoa1ItemStateChanged(evt);
            }
        });

        javax.swing.GroupLayout qllopCreateLayout = new javax.swing.GroupLayout(qllopCreate);
        qllopCreate.setLayout(qllopCreateLayout);
        qllopCreateLayout.setHorizontalGroup(
            qllopCreateLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(qllopCreateLayout.createSequentialGroup()
                .addGroup(qllopCreateLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(qllopCreateLayout.createSequentialGroup()
                        .addContainerGap()
                        .addGroup(qllopCreateLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jLabel31)
                            .addComponent(jLabel156))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(qllopCreateLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(txtloptenlop1, javax.swing.GroupLayout.PREFERRED_SIZE, 125, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addGroup(qllopCreateLayout.createSequentialGroup()
                                .addComponent(cbblopKhoa1, javax.swing.GroupLayout.PREFERRED_SIZE, 219, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addGap(18, 18, 18)
                                .addComponent(jLabel33)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 8, Short.MAX_VALUE)
                                .addComponent(cbblopKhoaHoc1, javax.swing.GroupLayout.PREFERRED_SIZE, 106, javax.swing.GroupLayout.PREFERRED_SIZE))))
                    .addGroup(qllopCreateLayout.createSequentialGroup()
                        .addGap(102, 102, 102)
                        .addComponent(btnCreate8, javax.swing.GroupLayout.PREFERRED_SIZE, 134, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(28, 28, 28)
                        .addComponent(btnlopreset, javax.swing.GroupLayout.PREFERRED_SIZE, 105, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addContainerGap(38, javax.swing.GroupLayout.PREFERRED_SIZE))
        );
        qllopCreateLayout.setVerticalGroup(
            qllopCreateLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(qllopCreateLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(qllopCreateLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel31)
                    .addComponent(txtloptenlop1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(10, 10, 10)
                .addGroup(qllopCreateLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(cbblopKhoaHoc1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addGroup(qllopCreateLayout.createSequentialGroup()
                        .addGroup(qllopCreateLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(cbblopKhoa1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jLabel156)
                            .addComponent(jLabel33))
                        .addGap(12, 12, 12)
                        .addGroup(qllopCreateLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(btnCreate8)
                            .addComponent(btnlopreset))))
                .addGap(12, 12, 12))
        );

        qlk3.add(qllopCreate, "card2");

        qllopEdit.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Cập nhật thông tin lớp học", javax.swing.border.TitledBorder.LEFT, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Tahoma", 1, 12))); // NOI18N

        jLabel34.setText("LopID: ");

        jLabel35.setText("Tên lớp học: ");

        cbblopkhoa2.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Item 1", "Item 2", "Item 3", "Item 4" }));
        cbblopkhoa2.addItemListener(new java.awt.event.ItemListener() {
            public void itemStateChanged(java.awt.event.ItemEvent evt) {
                cbblopkhoa2ItemStateChanged(evt);
            }
        });

        jLabel36.setText("Khoa: ");

        btnlopcapnhat.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Images/update.png"))); // NOI18N
        btnlopcapnhat.setText("Cập nhật");
        btnlopcapnhat.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnlopcapnhatActionPerformed(evt);
            }
        });

        jLabel37.setText("Khóa học: ");

        cbblopkhoahoc2.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Item 1", "Item 2", "Item 3", "Item 4" }));

        javax.swing.GroupLayout qllopEditLayout = new javax.swing.GroupLayout(qllopEdit);
        qllopEdit.setLayout(qllopEditLayout);
        qllopEditLayout.setHorizontalGroup(
            qllopEditLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(qllopEditLayout.createSequentialGroup()
                .addGap(2, 2, 2)
                .addGroup(qllopEditLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(qllopEditLayout.createSequentialGroup()
                        .addComponent(jLabel36)
                        .addGap(7, 7, 7)
                        .addComponent(cbblopkhoa2, javax.swing.GroupLayout.PREFERRED_SIZE, 191, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addGroup(qllopEditLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                            .addGroup(qllopEditLayout.createSequentialGroup()
                                .addComponent(jLabel35)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                .addComponent(txtloptenlop2, javax.swing.GroupLayout.PREFERRED_SIZE, 138, javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addGroup(qllopEditLayout.createSequentialGroup()
                                .addComponent(jLabel37)
                                .addGap(20, 20, 20)
                                .addComponent(cbblopkhoahoc2, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))
                        .addGap(88, 88, 88))
                    .addGroup(qllopEditLayout.createSequentialGroup()
                        .addComponent(jLabel34)
                        .addGap(3, 3, 3)
                        .addComponent(txtloplopid, javax.swing.GroupLayout.PREFERRED_SIZE, 98, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addContainerGap(378, Short.MAX_VALUE))))
            .addGroup(qllopEditLayout.createSequentialGroup()
                .addGap(176, 176, 176)
                .addComponent(btnlopcapnhat)
                .addContainerGap(244, Short.MAX_VALUE))
        );
        qllopEditLayout.setVerticalGroup(
            qllopEditLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(qllopEditLayout.createSequentialGroup()
                .addGroup(qllopEditLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(qllopEditLayout.createSequentialGroup()
                        .addContainerGap()
                        .addGroup(qllopEditLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(qllopEditLayout.createSequentialGroup()
                                .addGap(8, 8, 8)
                                .addComponent(txtloplopid, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addGroup(qllopEditLayout.createSequentialGroup()
                                .addGap(10, 10, 10)
                                .addComponent(jLabel34)))
                        .addGroup(qllopEditLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(qllopEditLayout.createSequentialGroup()
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                .addComponent(jLabel36))
                            .addGroup(qllopEditLayout.createSequentialGroup()
                                .addGap(11, 11, 11)
                                .addComponent(cbblopkhoa2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))))
                    .addGroup(qllopEditLayout.createSequentialGroup()
                        .addGap(10, 10, 10)
                        .addGroup(qllopEditLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(txtloptenlop2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jLabel35))
                        .addGroup(qllopEditLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(qllopEditLayout.createSequentialGroup()
                                .addGap(11, 11, 11)
                                .addComponent(jLabel37))
                            .addGroup(qllopEditLayout.createSequentialGroup()
                                .addGap(10, 10, 10)
                                .addComponent(cbblopkhoahoc2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))))
                .addGap(18, 18, 18)
                .addComponent(btnlopcapnhat)
                .addGap(99, 99, 99))
        );

        qlk3.add(qllopEdit, "card3");

        javax.swing.GroupLayout quanlikhoa4Layout = new javax.swing.GroupLayout(quanlikhoa4);
        quanlikhoa4.setLayout(quanlikhoa4Layout);
        quanlikhoa4Layout.setHorizontalGroup(
            quanlikhoa4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(quanlikhoa4Layout.createSequentialGroup()
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addComponent(qlkthaotac4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(qlk3, javax.swing.GroupLayout.PREFERRED_SIZE, 532, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(36, 36, 36))
        );
        quanlikhoa4Layout.setVerticalGroup(
            quanlikhoa4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(quanlikhoa4Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(quanlikhoa4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(qlkthaotac4, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(qlk3, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 154, javax.swing.GroupLayout.PREFERRED_SIZE)))
        );

        tableLop.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null}
            },
            new String [] {
                "Title 1", "Title 2", "Title 3", "Title 4"
            }
        ));
        tableLop.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                tableLopMouseClicked(evt);
            }
        });
        jScrollPane4.setViewportView(tableLop);

        txtSearchLop.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyPressed(java.awt.event.KeyEvent evt) {
                txtSearchLopKeyPressed(evt);
            }
            public void keyReleased(java.awt.event.KeyEvent evt) {
                txtSearchLopKeyReleased(evt);
            }
        });

        jLabel38.setText("Tìm kiếm: ");

        javax.swing.GroupLayout jPanel17Layout = new javax.swing.GroupLayout(jPanel17);
        jPanel17.setLayout(jPanel17Layout);
        jPanel17Layout.setHorizontalGroup(
            jPanel17Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel17Layout.createSequentialGroup()
                .addGroup(jPanel17Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addGroup(jPanel17Layout.createSequentialGroup()
                        .addGap(144, 144, 144)
                        .addComponent(jLabel38)
                        .addGap(3, 3, 3)
                        .addComponent(txtSearchLop, javax.swing.GroupLayout.PREFERRED_SIZE, 363, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(jPanel17Layout.createSequentialGroup()
                        .addContainerGap()
                        .addComponent(jScrollPane4, javax.swing.GroupLayout.PREFERRED_SIZE, 701, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addComponent(quanlikhoa4, 0, 711, Short.MAX_VALUE))
                .addContainerGap(22, Short.MAX_VALUE))
        );
        jPanel17Layout.setVerticalGroup(
            jPanel17Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel17Layout.createSequentialGroup()
                .addComponent(quanlikhoa4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(18, 18, 18)
                .addGroup(jPanel17Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel17Layout.createSequentialGroup()
                        .addGap(2, 2, 2)
                        .addComponent(jLabel38))
                    .addComponent(txtSearchLop, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(18, 18, 18)
                .addComponent(jScrollPane4, javax.swing.GroupLayout.PREFERRED_SIZE, 382, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(26, Short.MAX_VALUE))
        );

        javax.swing.GroupLayout jPanel5Layout = new javax.swing.GroupLayout(jPanel5);
        jPanel5.setLayout(jPanel5Layout);
        jPanel5Layout.setHorizontalGroup(
            jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel5Layout.createSequentialGroup()
                .addComponent(jPanel17, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addContainerGap())
        );
        jPanel5Layout.setVerticalGroup(
            jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel5Layout.createSequentialGroup()
                .addComponent(jPanel17, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addContainerGap())
        );

        jTabbedPane1.addTab("", new javax.swing.ImageIcon(getClass().getResource("/Images/QUAN LY LOP HOC.png")), jPanel5); // NOI18N

        jPanel6.addComponentListener(new java.awt.event.ComponentAdapter() {
            public void componentShown(java.awt.event.ComponentEvent evt) {
                jPanel6ComponentShown(evt);
            }
        });

        quanlikhoa5.setAlignmentX(0.0F);
        quanlikhoa5.setAlignmentY(0.0F);

        qlkthaotac5.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Thao tác", javax.swing.border.TitledBorder.LEFT, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Tahoma", 1, 12))); // NOI18N
        qlkthaotac5.setPreferredSize(new java.awt.Dimension(219, 242));

        btnnhomxoa.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Images/Delete.png"))); // NOI18N
        btnnhomxoa.setText("Xóa");
        btnnhomxoa.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnnhomxoaActionPerformed(evt);
            }
        });

        btnCreate9.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Images/add.png"))); // NOI18N
        btnCreate9.setText("Thêm mới");
        btnCreate9.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnCreate9ActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout qlkthaotac5Layout = new javax.swing.GroupLayout(qlkthaotac5);
        qlkthaotac5.setLayout(qlkthaotac5Layout);
        qlkthaotac5Layout.setHorizontalGroup(
            qlkthaotac5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(qlkthaotac5Layout.createSequentialGroup()
                .addGap(19, 19, 19)
                .addGroup(qlkthaotac5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                    .addComponent(btnnhomxoa, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(btnCreate9, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.PREFERRED_SIZE, 121, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );
        qlkthaotac5Layout.setVerticalGroup(
            qlkthaotac5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(qlkthaotac5Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(btnCreate9)
                .addGap(15, 15, 15)
                .addComponent(btnnhomxoa)
                .addContainerGap(65, Short.MAX_VALUE))
        );

        qlk4.setLayout(new java.awt.CardLayout());

        qlnhomCreate.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Thêm mới nhóm", javax.swing.border.TitledBorder.LEFT, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Tahoma", 1, 12))); // NOI18N

        jLabel40.setText("Tên nhóm: ");

        jLabel41.setText("Trạng thái: ");

        btnnhomreset.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Images/refresh.png"))); // NOI18N
        btnnhomreset.setText("Reset");
        btnnhomreset.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnnhomresetActionPerformed(evt);
            }
        });

        cbbnhomtt1.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Enable", "Disable" }));

        btnnhomthem.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Images/add.png"))); // NOI18N
        btnnhomthem.setText("Thêm mới");
        btnnhomthem.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnnhomthemActionPerformed(evt);
            }
        });

        jLabel42.setText("Kỳ: ");

        cbbnhomky1.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Item 1", "Item 2", "Item 3", "Item 4" }));

        jLabel157.setText("Khoa: ");

        cbbnhomkhoa1.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Item 1", "Item 2", "Item 3", "Item 4" }));
        cbbnhomkhoa1.addItemListener(new java.awt.event.ItemListener() {
            public void itemStateChanged(java.awt.event.ItemEvent evt) {
                cbbnhomkhoa1ItemStateChanged(evt);
            }
        });

        jLabel158.setText("KhoaHoc:");

        cbbnhomkhoahoc1.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Item 1", "Item 2", "Item 3", "Item 4" }));
        cbbnhomkhoahoc1.addItemListener(new java.awt.event.ItemListener() {
            public void itemStateChanged(java.awt.event.ItemEvent evt) {
                cbbnhomkhoahoc1ItemStateChanged(evt);
            }
        });

        javax.swing.GroupLayout qlnhomCreateLayout = new javax.swing.GroupLayout(qlnhomCreate);
        qlnhomCreate.setLayout(qlnhomCreateLayout);
        qlnhomCreateLayout.setHorizontalGroup(
            qlnhomCreateLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(qlnhomCreateLayout.createSequentialGroup()
                .addGroup(qlnhomCreateLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(qlnhomCreateLayout.createSequentialGroup()
                        .addContainerGap()
                        .addGroup(qlnhomCreateLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jLabel40)
                            .addComponent(jLabel158))
                        .addGap(6, 6, 6)
                        .addGroup(qlnhomCreateLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                            .addGroup(qlnhomCreateLayout.createSequentialGroup()
                                .addComponent(cbbnhomkhoahoc1, javax.swing.GroupLayout.PREFERRED_SIZE, 108, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addGap(18, 18, 18))
                            .addGroup(javax.swing.GroupLayout.Alignment.LEADING, qlnhomCreateLayout.createSequentialGroup()
                                .addComponent(txtnhomtennhom1, javax.swing.GroupLayout.PREFERRED_SIZE, 108, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addGap(18, 18, 18)))
                        .addGroup(qlnhomCreateLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jLabel157)
                            .addComponent(jLabel42))
                        .addGap(5, 5, 5)
                        .addGroup(qlnhomCreateLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(cbbnhomky1, javax.swing.GroupLayout.PREFERRED_SIZE, 86, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(cbbnhomkhoa1, javax.swing.GroupLayout.PREFERRED_SIZE, 202, javax.swing.GroupLayout.PREFERRED_SIZE)))
                    .addGroup(qlnhomCreateLayout.createSequentialGroup()
                        .addContainerGap()
                        .addComponent(jLabel41)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(cbbnhomtt1, javax.swing.GroupLayout.PREFERRED_SIZE, 86, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(qlnhomCreateLayout.createSequentialGroup()
                        .addGap(101, 101, 101)
                        .addComponent(btnnhomthem, javax.swing.GroupLayout.PREFERRED_SIZE, 134, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(28, 28, 28)
                        .addComponent(btnnhomreset, javax.swing.GroupLayout.PREFERRED_SIZE, 105, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addContainerGap(73, Short.MAX_VALUE))
        );
        qlnhomCreateLayout.setVerticalGroup(
            qlnhomCreateLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(qlnhomCreateLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(qlnhomCreateLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(qlnhomCreateLayout.createSequentialGroup()
                        .addGroup(qlnhomCreateLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jLabel40)
                            .addComponent(txtnhomtennhom1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jLabel157))
                        .addGap(10, 10, 10)
                        .addGroup(qlnhomCreateLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(cbbnhomkhoahoc1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jLabel42)
                            .addComponent(jLabel158)))
                    .addGroup(qlnhomCreateLayout.createSequentialGroup()
                        .addComponent(cbbnhomkhoa1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(10, 10, 10)
                        .addComponent(cbbnhomky1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(qlnhomCreateLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(qlnhomCreateLayout.createSequentialGroup()
                        .addGap(31, 31, 31)
                        .addGroup(qlnhomCreateLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(btnnhomthem)
                            .addComponent(btnnhomreset)))
                    .addGroup(qlnhomCreateLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                        .addComponent(jLabel41)
                        .addComponent(cbbnhomtt1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addGap(66, 66, 66))
        );

        qlk4.add(qlnhomCreate, "card2");

        qlnhomEdit.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Cập nhật thông tin nhóm", javax.swing.border.TitledBorder.LEFT, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Tahoma", 1, 12))); // NOI18N

        jLabel43.setText("NhomID: ");

        jLabel44.setText("Tên nhóm: ");

        cbbnhomky2.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Item 1", "Item 2", "Item 3", "Item 4" }));

        jLabel45.setText("Trạng thái: ");

        btnnhomcapnhat.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Images/update.png"))); // NOI18N
        btnnhomcapnhat.setText("Cập nhật");
        btnnhomcapnhat.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnnhomcapnhatActionPerformed(evt);
            }
        });

        jLabel46.setText("Kỳ: ");

        cbbnhomtt2.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Enable", "Disable" }));

        jLabel159.setText("KhoaHoc:");

        cbbnhomkhoahoc2.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Item 1", "Item 2", "Item 3", "Item 4" }));

        jLabel160.setText("Khoa: ");

        cbbnhomkhoa2.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Item 1", "Item 2", "Item 3", "Item 4" }));
        cbbnhomkhoa2.addItemListener(new java.awt.event.ItemListener() {
            public void itemStateChanged(java.awt.event.ItemEvent evt) {
                cbbnhomkhoa2ItemStateChanged(evt);
            }
        });

        javax.swing.GroupLayout qlnhomEditLayout = new javax.swing.GroupLayout(qlnhomEdit);
        qlnhomEdit.setLayout(qlnhomEditLayout);
        qlnhomEditLayout.setHorizontalGroup(
            qlnhomEditLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(qlnhomEditLayout.createSequentialGroup()
                .addGap(166, 166, 166)
                .addComponent(btnnhomcapnhat))
            .addGroup(qlnhomEditLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(qlnhomEditLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(qlnhomEditLayout.createSequentialGroup()
                        .addComponent(jLabel43)
                        .addGap(13, 13, 13)
                        .addComponent(txtnhomnhomid, javax.swing.GroupLayout.PREFERRED_SIZE, 109, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(qlnhomEditLayout.createSequentialGroup()
                        .addGroup(qlnhomEditLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jLabel46)
                            .addComponent(jLabel160))
                        .addGap(27, 27, 27)
                        .addGroup(qlnhomEditLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(cbbnhomkhoa2, javax.swing.GroupLayout.PREFERRED_SIZE, 175, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(cbbnhomky2, javax.swing.GroupLayout.PREFERRED_SIZE, 107, javax.swing.GroupLayout.PREFERRED_SIZE))))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addGroup(qlnhomEditLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(qlnhomEditLayout.createSequentialGroup()
                        .addComponent(jLabel44)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(txtnhomtennhom2, javax.swing.GroupLayout.PREFERRED_SIZE, 132, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(qlnhomEditLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                        .addGroup(qlnhomEditLayout.createSequentialGroup()
                            .addComponent(jLabel45)
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                            .addComponent(cbbnhomtt2, javax.swing.GroupLayout.PREFERRED_SIZE, 123, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addGroup(javax.swing.GroupLayout.Alignment.LEADING, qlnhomEditLayout.createSequentialGroup()
                            .addComponent(jLabel159)
                            .addGap(18, 18, 18)
                            .addComponent(cbbnhomkhoahoc2, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))))
                .addGap(68, 68, 68))
        );
        qlnhomEditLayout.setVerticalGroup(
            qlnhomEditLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(qlnhomEditLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(qlnhomEditLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(txtnhomnhomid, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel43, javax.swing.GroupLayout.Alignment.TRAILING))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(qlnhomEditLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(cbbnhomkhoa2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel160))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(qlnhomEditLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(cbbnhomky2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel46))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(btnnhomcapnhat))
            .addGroup(qlnhomEditLayout.createSequentialGroup()
                .addGap(10, 10, 10)
                .addGroup(qlnhomEditLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel44)
                    .addComponent(txtnhomtennhom2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(qlnhomEditLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel159)
                    .addComponent(cbbnhomkhoahoc2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(qlnhomEditLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel45)
                    .addComponent(cbbnhomtt2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
        );

        qlk4.add(qlnhomEdit, "card3");

        javax.swing.GroupLayout quanlikhoa5Layout = new javax.swing.GroupLayout(quanlikhoa5);
        quanlikhoa5.setLayout(quanlikhoa5Layout);
        quanlikhoa5Layout.setHorizontalGroup(
            quanlikhoa5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, quanlikhoa5Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(qlkthaotac5, javax.swing.GroupLayout.DEFAULT_SIZE, 160, Short.MAX_VALUE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(qlk4, javax.swing.GroupLayout.PREFERRED_SIZE, 523, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap())
        );
        quanlikhoa5Layout.setVerticalGroup(
            quanlikhoa5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(quanlikhoa5Layout.createSequentialGroup()
                .addGroup(quanlikhoa5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(quanlikhoa5Layout.createSequentialGroup()
                        .addContainerGap()
                        .addComponent(qlkthaotac5, javax.swing.GroupLayout.DEFAULT_SIZE, 188, Short.MAX_VALUE))
                    .addGroup(quanlikhoa5Layout.createSequentialGroup()
                        .addGap(15, 15, 15)
                        .addComponent(qlk4, javax.swing.GroupLayout.PREFERRED_SIZE, 184, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addContainerGap())
        );

        tableNhom.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null}
            },
            new String [] {
                "Title 1", "Title 2", "Title 3", "Title 4"
            }
        ));
        tableNhom.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                tableNhomMouseClicked(evt);
            }
        });
        jScrollPane5.setViewportView(tableNhom);

        jLabel47.setText("Tìm kiếm: ");

        txtSearchNhom.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyPressed(java.awt.event.KeyEvent evt) {
                txtSearchNhomKeyPressed(evt);
            }
            public void keyReleased(java.awt.event.KeyEvent evt) {
                txtSearchNhomKeyReleased(evt);
            }
        });

        javax.swing.GroupLayout jPanel18Layout = new javax.swing.GroupLayout(jPanel18);
        jPanel18.setLayout(jPanel18Layout);
        jPanel18Layout.setHorizontalGroup(
            jPanel18Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel18Layout.createSequentialGroup()
                .addGap(3, 3, 3)
                .addComponent(quanlikhoa5, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap())
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel18Layout.createSequentialGroup()
                .addContainerGap(159, Short.MAX_VALUE)
                .addComponent(jLabel47)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(txtSearchNhom, javax.swing.GroupLayout.PREFERRED_SIZE, 398, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(125, 125, 125))
            .addGroup(jPanel18Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jScrollPane5, javax.swing.GroupLayout.PREFERRED_SIZE, 702, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(21, Short.MAX_VALUE))
        );
        jPanel18Layout.setVerticalGroup(
            jPanel18Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel18Layout.createSequentialGroup()
                .addComponent(quanlikhoa5, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(18, 18, 18)
                .addGroup(jPanel18Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel47)
                    .addComponent(txtSearchNhom, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(18, 18, 18)
                .addComponent(jScrollPane5, javax.swing.GroupLayout.PREFERRED_SIZE, 317, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(46, Short.MAX_VALUE))
        );

        javax.swing.GroupLayout jPanel6Layout = new javax.swing.GroupLayout(jPanel6);
        jPanel6.setLayout(jPanel6Layout);
        jPanel6Layout.setHorizontalGroup(
            jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel6Layout.createSequentialGroup()
                .addComponent(jPanel18, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addContainerGap())
        );
        jPanel6Layout.setVerticalGroup(
            jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel6Layout.createSequentialGroup()
                .addComponent(jPanel18, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addContainerGap())
        );

        jTabbedPane1.addTab("", new javax.swing.ImageIcon(getClass().getResource("/Images/QUAN LY NHOM.png")), jPanel6); // NOI18N

        jPanel7.addComponentListener(new java.awt.event.ComponentAdapter() {
            public void componentShown(java.awt.event.ComponentEvent evt) {
                jPanel7ComponentShown(evt);
            }
        });

        quanlikhoa6.setAlignmentX(0.0F);
        quanlikhoa6.setAlignmentY(0.0F);

        qlkthaotac6.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Thao tác", javax.swing.border.TitledBorder.LEFT, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Tahoma", 1, 12))); // NOI18N

        btnDelete13.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Images/Delete.png"))); // NOI18N
        btnDelete13.setText("Xóa");
        btnDelete13.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnDelete13ActionPerformed(evt);
            }
        });

        btnCreate11.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Images/add.png"))); // NOI18N
        btnCreate11.setText("Thêm mới");
        btnCreate11.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnCreate11ActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout qlkthaotac6Layout = new javax.swing.GroupLayout(qlkthaotac6);
        qlkthaotac6.setLayout(qlkthaotac6Layout);
        qlkthaotac6Layout.setHorizontalGroup(
            qlkthaotac6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(qlkthaotac6Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(qlkthaotac6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                    .addComponent(btnDelete13, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addGroup(javax.swing.GroupLayout.Alignment.LEADING, qlkthaotac6Layout.createSequentialGroup()
                        .addGap(1, 1, 1)
                        .addComponent(btnCreate11, javax.swing.GroupLayout.PREFERRED_SIZE, 121, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addContainerGap(16, Short.MAX_VALUE))
        );
        qlkthaotac6Layout.setVerticalGroup(
            qlkthaotac6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(qlkthaotac6Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(btnCreate11)
                .addGap(17, 17, 17)
                .addComponent(btnDelete13)
                .addContainerGap(27, Short.MAX_VALUE))
        );

        qlk5.setLayout(new java.awt.CardLayout());

        qlmonCreate.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Thêm mới môn học", javax.swing.border.TitledBorder.LEFT, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Tahoma", 1, 12))); // NOI18N

        jLabel49.setText("Tên môn học: ");

        jLabel50.setText("Trạng thái: ");

        btnmhreset.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Images/refresh.png"))); // NOI18N
        btnmhreset.setText("Reset");
        btnmhreset.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnmhresetActionPerformed(evt);
            }
        });

        cbbmhtt1.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Enable", "Disable" }));

        btnmhthem.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Images/add.png"))); // NOI18N
        btnmhthem.setText("Thêm mới");
        btnmhthem.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnmhthemActionPerformed(evt);
            }
        });

        jLabel51.setText("Khoa:");

        cbbmhkhoa1.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Item 1", "Item 2", "Item 3", "Item 4" }));

        jLabel59.setText("Tổng số tiết: ");

        txtmhtong1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                txtmhtong1ActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout qlmonCreateLayout = new javax.swing.GroupLayout(qlmonCreate);
        qlmonCreate.setLayout(qlmonCreateLayout);
        qlmonCreateLayout.setHorizontalGroup(
            qlmonCreateLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(qlmonCreateLayout.createSequentialGroup()
                .addGap(84, 84, 84)
                .addComponent(btnmhthem, javax.swing.GroupLayout.PREFERRED_SIZE, 134, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 42, Short.MAX_VALUE)
                .addComponent(btnmhreset, javax.swing.GroupLayout.PREFERRED_SIZE, 105, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(187, 187, 187))
            .addGroup(qlmonCreateLayout.createSequentialGroup()
                .addGap(60, 60, 60)
                .addGroup(qlmonCreateLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabel59)
                    .addComponent(jLabel49)
                    .addComponent(jLabel51))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(qlmonCreateLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addGroup(javax.swing.GroupLayout.Alignment.LEADING, qlmonCreateLayout.createSequentialGroup()
                        .addComponent(txtmhtong1, javax.swing.GroupLayout.PREFERRED_SIZE, 78, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(31, 31, 31)
                        .addComponent(jLabel50)
                        .addGap(18, 18, 18)
                        .addComponent(cbbmhtt1, javax.swing.GroupLayout.PREFERRED_SIZE, 94, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(javax.swing.GroupLayout.Alignment.LEADING, qlmonCreateLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                        .addComponent(txtmhtenmon1, javax.swing.GroupLayout.DEFAULT_SIZE, 277, Short.MAX_VALUE)
                        .addComponent(cbbmhkhoa1, 0, 277, Short.MAX_VALUE)))
                .addGap(137, 137, 137))
        );
        qlmonCreateLayout.setVerticalGroup(
            qlmonCreateLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(qlmonCreateLayout.createSequentialGroup()
                .addGroup(qlmonCreateLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel49)
                    .addComponent(txtmhtenmon1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(qlmonCreateLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel51)
                    .addComponent(cbbmhkhoa1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(qlmonCreateLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addGroup(qlmonCreateLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                        .addComponent(txtmhtong1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addComponent(jLabel59)
                        .addComponent(jLabel50))
                    .addComponent(cbbmhtt1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(11, 11, 11)
                .addGroup(qlmonCreateLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(btnmhthem)
                    .addComponent(btnmhreset))
                .addGap(86, 86, 86))
        );

        qlk5.add(qlmonCreate, "card2");

        qlmonEdit.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Cập nhật thông tin môn học", javax.swing.border.TitledBorder.LEFT, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Tahoma", 1, 12))); // NOI18N

        jLabel52.setText("MonHocID:");

        jLabel53.setText("Tên môn học: ");

        cbbmhtt2.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Enable", "Disable" }));

        jLabel54.setText("Trạng thái: ");

        btnmhCapnhat.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Images/update.png"))); // NOI18N
        btnmhCapnhat.setText("Cập nhật");
        btnmhCapnhat.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnmhCapnhatActionPerformed(evt);
            }
        });

        jLabel55.setText("Khoa: ");

        cbbmhKhoa2.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Item 1", "Item 2", "Item 3", "Item 4" }));

        jLabel58.setText("Tổng số tiết: ");

        txtmhtong2.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                txtmhtong2ActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout qlmonEditLayout = new javax.swing.GroupLayout(qlmonEdit);
        qlmonEdit.setLayout(qlmonEditLayout);
        qlmonEditLayout.setHorizontalGroup(
            qlmonEditLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(qlmonEditLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(qlmonEditLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabel52)
                    .addComponent(jLabel55)
                    .addComponent(jLabel58))
                .addGap(22, 22, 22)
                .addGroup(qlmonEditLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(qlmonEditLayout.createSequentialGroup()
                        .addComponent(txtmhmonhocid, javax.swing.GroupLayout.PREFERRED_SIZE, 72, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(10, 10, 10)
                        .addComponent(jLabel53)
                        .addGap(18, 18, 18)
                        .addComponent(txtmhtenmon2, javax.swing.GroupLayout.DEFAULT_SIZE, 227, Short.MAX_VALUE))
                    .addGroup(qlmonEditLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                        .addComponent(cbbmhKhoa2, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.PREFERRED_SIZE, 287, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGroup(qlmonEditLayout.createSequentialGroup()
                            .addComponent(txtmhtong2)
                            .addGap(18, 18, 18)
                            .addGroup(qlmonEditLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                .addComponent(btnmhCapnhat)
                                .addGroup(qlmonEditLayout.createSequentialGroup()
                                    .addComponent(jLabel54)
                                    .addGap(26, 26, 26)
                                    .addComponent(cbbmhtt2, javax.swing.GroupLayout.PREFERRED_SIZE, 118, javax.swing.GroupLayout.PREFERRED_SIZE))))))
                .addContainerGap())
        );
        qlmonEditLayout.setVerticalGroup(
            qlmonEditLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(qlmonEditLayout.createSequentialGroup()
                .addGroup(qlmonEditLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(qlmonEditLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                        .addComponent(txtmhmonhocid, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addComponent(jLabel52)
                        .addComponent(jLabel53))
                    .addComponent(txtmhtenmon2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(qlmonEditLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabel55)
                    .addComponent(cbbmhKhoa2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(qlmonEditLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(qlmonEditLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                        .addComponent(jLabel58)
                        .addComponent(txtmhtong2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(qlmonEditLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                        .addComponent(cbbmhtt2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addComponent(jLabel54)))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(btnmhCapnhat)
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        qlk5.add(qlmonEdit, "card3");

        javax.swing.GroupLayout quanlikhoa6Layout = new javax.swing.GroupLayout(quanlikhoa6);
        quanlikhoa6.setLayout(quanlikhoa6Layout);
        quanlikhoa6Layout.setHorizontalGroup(
            quanlikhoa6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(quanlikhoa6Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(qlkthaotac6, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(qlk5, javax.swing.GroupLayout.PREFERRED_SIZE, 517, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(26, Short.MAX_VALUE))
        );
        quanlikhoa6Layout.setVerticalGroup(
            quanlikhoa6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(quanlikhoa6Layout.createSequentialGroup()
                .addGroup(quanlikhoa6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(qlk5, javax.swing.GroupLayout.Alignment.LEADING, 0, 0, Short.MAX_VALUE)
                    .addComponent(qlkthaotac6, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        tableMon.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null}
            },
            new String [] {
                "Title 1", "Title 2", "Title 3", "Title 4"
            }
        ));
        tableMon.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                tableMonMouseClicked(evt);
            }
        });
        jScrollPane6.setViewportView(tableMon);

        jLabel56.setText("Tìm kiếm: ");

        txtSearchMonHoc.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyPressed(java.awt.event.KeyEvent evt) {
                txtSearchMonHocKeyPressed(evt);
            }
            public void keyReleased(java.awt.event.KeyEvent evt) {
                txtSearchMonHocKeyReleased(evt);
            }
        });

        javax.swing.GroupLayout jPanel19Layout = new javax.swing.GroupLayout(jPanel19);
        jPanel19.setLayout(jPanel19Layout);
        jPanel19Layout.setHorizontalGroup(
            jPanel19Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel19Layout.createSequentialGroup()
                .addContainerGap(166, Short.MAX_VALUE)
                .addComponent(jLabel56)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(txtSearchMonHoc, javax.swing.GroupLayout.PREFERRED_SIZE, 373, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(137, 137, 137))
            .addGroup(jPanel19Layout.createSequentialGroup()
                .addComponent(quanlikhoa6, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addContainerGap())
            .addGroup(jPanel19Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jScrollPane6, javax.swing.GroupLayout.PREFERRED_SIZE, 692, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(31, Short.MAX_VALUE))
        );
        jPanel19Layout.setVerticalGroup(
            jPanel19Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel19Layout.createSequentialGroup()
                .addComponent(quanlikhoa6, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(18, 18, 18)
                .addGroup(jPanel19Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel56)
                    .addComponent(txtSearchMonHoc, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(jScrollPane6, javax.swing.GroupLayout.PREFERRED_SIZE, 376, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        javax.swing.GroupLayout jPanel7Layout = new javax.swing.GroupLayout(jPanel7);
        jPanel7.setLayout(jPanel7Layout);
        jPanel7Layout.setHorizontalGroup(
            jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel7Layout.createSequentialGroup()
                .addComponent(jPanel19, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addContainerGap())
        );
        jPanel7Layout.setVerticalGroup(
            jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel7Layout.createSequentialGroup()
                .addComponent(jPanel19, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(41, Short.MAX_VALUE))
        );

        jTabbedPane1.addTab("", new javax.swing.ImageIcon(getClass().getResource("/Images/QUAN LY MON HOC.png")), jPanel7); // NOI18N

        jPanel8.addComponentListener(new java.awt.event.ComponentAdapter() {
            public void componentShown(java.awt.event.ComponentEvent evt) {
                jPanel8ComponentShown(evt);
            }
        });

        quanlikhoa7.setAlignmentX(0.0F);
        quanlikhoa7.setAlignmentY(0.0F);
        quanlikhoa7.setPreferredSize(new java.awt.Dimension(600, 435));

        qlkthaotac7.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Thao tác", javax.swing.border.TitledBorder.LEFT, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Tahoma", 1, 12))); // NOI18N

        btnsvdelete.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Images/Delete.png"))); // NOI18N
        btnsvdelete.setText("Xóa");
        btnsvdelete.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnsvdeleteActionPerformed(evt);
            }
        });

        btnCreate13.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Images/add.png"))); // NOI18N
        btnCreate13.setText("Thêm mới");
        btnCreate13.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnCreate13ActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout qlkthaotac7Layout = new javax.swing.GroupLayout(qlkthaotac7);
        qlkthaotac7.setLayout(qlkthaotac7Layout);
        qlkthaotac7Layout.setHorizontalGroup(
            qlkthaotac7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, qlkthaotac7Layout.createSequentialGroup()
                .addGap(6, 6, 6)
                .addGroup(qlkthaotac7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(btnsvdelete, javax.swing.GroupLayout.DEFAULT_SIZE, 121, Short.MAX_VALUE)
                    .addComponent(btnCreate13, javax.swing.GroupLayout.PREFERRED_SIZE, 121, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(10, 10, 10))
        );
        qlkthaotac7Layout.setVerticalGroup(
            qlkthaotac7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(qlkthaotac7Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(btnCreate13)
                .addGap(18, 18, 18)
                .addComponent(btnsvdelete)
                .addContainerGap(185, Short.MAX_VALUE))
        );

        qlk6.setLayout(new java.awt.CardLayout());

        qlsvCreate.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Thêm mới sinh viên", javax.swing.border.TitledBorder.LEFT, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Tahoma", 1, 12))); // NOI18N
        qlsvCreate.setAlignmentX(0.0F);
        qlsvCreate.setAlignmentY(0.0F);

        jLabel60.setText("Họ tên: ");

        jLabel61.setText("Trạng thái: ");

        btnsvreset.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Images/refresh.png"))); // NOI18N
        btnsvreset.setText("Reset");
        btnsvreset.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnsvresetActionPerformed(evt);
            }
        });

        cbbsvtt1.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Enable", "Disable" }));

        btnsvthem.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Images/add.png"))); // NOI18N
        btnsvthem.setText("Thêm mới");
        btnsvthem.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnsvthemActionPerformed(evt);
            }
        });

        jLabel62.setText("Khoa:");

        cbbsvkhoa1.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Item 1", "Item 2", "Item 3", "Item 4" }));
        cbbsvkhoa1.addItemListener(new java.awt.event.ItemListener() {
            public void itemStateChanged(java.awt.event.ItemEvent evt) {
                cbbsvkhoa1ItemStateChanged(evt);
            }
        });

        jLabel63.setText("Ngày sinh: ");

        jLabel71.setText("Khóa học: ");

        cbbsvkhoahoc1.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Item 1", "Item 2", "Item 3", "Item 4" }));
        cbbsvkhoahoc1.addItemListener(new java.awt.event.ItemListener() {
            public void itemStateChanged(java.awt.event.ItemEvent evt) {
                cbbsvkhoahoc1ItemStateChanged(evt);
            }
        });

        jLabel72.setText("Dân tộc: ");

        jLabel73.setText("Quốc tịch: ");

        jLabel74.setText("Email: ");

        txtsvemail1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                txtsvemail1ActionPerformed(evt);
            }
        });

        jLabel75.setText("Điện thoại: ");

        jLabel76.setText("CMND: ");

        jLabel77.setText("Địa chỉ: ");

        jLabel69.setText("Lớp: ");

        cbbsvlop1.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Item 1", "Item 2", "Item 3", "Item 4" }));

        jLabel162.setText("Giới tính: ");

        cbbsvgiotinh1.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Nam", "Nữ" }));

        javax.swing.GroupLayout qlsvCreateLayout = new javax.swing.GroupLayout(qlsvCreate);
        qlsvCreate.setLayout(qlsvCreateLayout);
        qlsvCreateLayout.setHorizontalGroup(
            qlsvCreateLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(qlsvCreateLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(qlsvCreateLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(qlsvCreateLayout.createSequentialGroup()
                        .addGroup(qlsvCreateLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jLabel63)
                            .addComponent(jLabel69))
                        .addGap(17, 17, 17)
                        .addGroup(qlsvCreateLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                            .addComponent(datesvngaysinh1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .addComponent(cbbsvlop1, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                        .addGroup(qlsvCreateLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(qlsvCreateLayout.createSequentialGroup()
                                .addGap(27, 27, 27)
                                .addComponent(jLabel72))
                            .addGroup(qlsvCreateLayout.createSequentialGroup()
                                .addGap(26, 26, 26)
                                .addComponent(jLabel162)))
                        .addGap(11, 11, 11)
                        .addGroup(qlsvCreateLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(qlsvCreateLayout.createSequentialGroup()
                                .addComponent(cbbsvgiotinh1, javax.swing.GroupLayout.PREFERRED_SIZE, 84, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 200, Short.MAX_VALUE))
                            .addComponent(txtsvdantoc1, javax.swing.GroupLayout.DEFAULT_SIZE, 284, Short.MAX_VALUE)))
                    .addGroup(qlsvCreateLayout.createSequentialGroup()
                        .addGroup(qlsvCreateLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jLabel62)
                            .addComponent(jLabel60))
                        .addGap(32, 32, 32)
                        .addGroup(qlsvCreateLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                            .addGroup(qlsvCreateLayout.createSequentialGroup()
                                .addComponent(cbbsvkhoa1, javax.swing.GroupLayout.PREFERRED_SIZE, 177, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addGap(27, 27, 27)
                                .addComponent(jLabel71)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(cbbsvkhoahoc1, javax.swing.GroupLayout.PREFERRED_SIZE, 136, javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addComponent(txtsvhoten1)))
                    .addGroup(qlsvCreateLayout.createSequentialGroup()
                        .addComponent(jLabel61)
                        .addGap(16, 16, 16)
                        .addGroup(qlsvCreateLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(qlsvCreateLayout.createSequentialGroup()
                                .addComponent(btnsvthem, javax.swing.GroupLayout.PREFERRED_SIZE, 134, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addGap(18, 18, 18)
                                .addComponent(btnsvreset, javax.swing.GroupLayout.PREFERRED_SIZE, 105, javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addComponent(cbbsvtt1, javax.swing.GroupLayout.PREFERRED_SIZE, 65, javax.swing.GroupLayout.PREFERRED_SIZE)))
                    .addGroup(qlsvCreateLayout.createSequentialGroup()
                        .addComponent(jLabel77)
                        .addGap(32, 32, 32)
                        .addComponent(txtsvdiachi1, javax.swing.GroupLayout.DEFAULT_SIZE, 457, Short.MAX_VALUE))
                    .addGroup(qlsvCreateLayout.createSequentialGroup()
                        .addComponent(jLabel75)
                        .addGap(15, 15, 15)
                        .addComponent(txtsvdienthoai1, javax.swing.GroupLayout.PREFERRED_SIZE, 158, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(46, 46, 46)
                        .addComponent(jLabel76)
                        .addGap(19, 19, 19)
                        .addComponent(txtsvcmnd1, javax.swing.GroupLayout.DEFAULT_SIZE, 198, Short.MAX_VALUE))
                    .addGroup(qlsvCreateLayout.createSequentialGroup()
                        .addComponent(jLabel73)
                        .addGap(18, 18, 18)
                        .addComponent(txtsvquoctich1, javax.swing.GroupLayout.PREFERRED_SIZE, 178, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(27, 27, 27)
                        .addComponent(jLabel74)
                        .addGap(24, 24, 24)
                        .addComponent(txtsvemail1, javax.swing.GroupLayout.DEFAULT_SIZE, 198, Short.MAX_VALUE)))
                .addContainerGap())
        );
        qlsvCreateLayout.setVerticalGroup(
            qlsvCreateLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(qlsvCreateLayout.createSequentialGroup()
                .addGroup(qlsvCreateLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(qlsvCreateLayout.createSequentialGroup()
                        .addGap(3, 3, 3)
                        .addComponent(jLabel60))
                    .addComponent(txtsvhoten1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(7, 7, 7)
                .addGroup(qlsvCreateLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(cbbsvkhoa1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addGroup(qlsvCreateLayout.createSequentialGroup()
                        .addGap(3, 3, 3)
                        .addComponent(jLabel62))
                    .addGroup(qlsvCreateLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                        .addComponent(cbbsvkhoahoc1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addComponent(jLabel71)))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(qlsvCreateLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(qlsvCreateLayout.createSequentialGroup()
                        .addGap(3, 3, 3)
                        .addComponent(jLabel69))
                    .addGroup(qlsvCreateLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                        .addComponent(cbbsvgiotinh1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addComponent(jLabel162))
                    .addComponent(cbbsvlop1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGroup(qlsvCreateLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(qlsvCreateLayout.createSequentialGroup()
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(qlsvCreateLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(qlsvCreateLayout.createSequentialGroup()
                                .addGap(2, 2, 2)
                                .addComponent(jLabel63))
                            .addGroup(qlsvCreateLayout.createSequentialGroup()
                                .addGap(4, 4, 4)
                                .addComponent(jLabel72))
                            .addComponent(txtsvdantoc1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                    .addGroup(qlsvCreateLayout.createSequentialGroup()
                        .addGap(7, 7, 7)
                        .addComponent(datesvngaysinh1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(qlsvCreateLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(qlsvCreateLayout.createSequentialGroup()
                        .addGap(1, 1, 1)
                        .addComponent(jLabel73))
                    .addGroup(qlsvCreateLayout.createSequentialGroup()
                        .addGap(3, 3, 3)
                        .addComponent(jLabel74))
                    .addComponent(txtsvemail1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(txtsvquoctich1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(qlsvCreateLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(qlsvCreateLayout.createSequentialGroup()
                        .addGap(4, 4, 4)
                        .addComponent(jLabel75))
                    .addGroup(qlsvCreateLayout.createSequentialGroup()
                        .addGap(3, 3, 3)
                        .addComponent(jLabel76))
                    .addComponent(txtsvdienthoai1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(txtsvcmnd1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(qlsvCreateLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(jLabel77, javax.swing.GroupLayout.PREFERRED_SIZE, 20, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(txtsvdiachi1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(qlsvCreateLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(qlsvCreateLayout.createSequentialGroup()
                        .addGap(4, 4, 4)
                        .addComponent(jLabel61))
                    .addComponent(cbbsvtt1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(qlsvCreateLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(btnsvthem)
                    .addComponent(btnsvreset)))
        );

        qlk6.add(qlsvCreate, "card2");

        qlsvEdit.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Cập nhật thông tin sinh viên", javax.swing.border.TitledBorder.LEFT, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Tahoma", 1, 12))); // NOI18N

        jLabel64.setText("SinhVienID: ");

        btnsvcapnhat.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Images/update.png"))); // NOI18N
        btnsvcapnhat.setText("Cập nhật");
        btnsvcapnhat.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnsvcapnhatActionPerformed(evt);
            }
        });

        jLabel65.setText("Tên sinh viên: ");

        jLabel78.setText("CMND: ");

        jLabel79.setText("Địa chỉ: ");

        jLabel80.setText("Email: ");

        cbbsvgioitinh2.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Nam", "Nữ" }));

        jLabel81.setText("Giới tính: ");

        jLabel82.setText("Điện thoại: ");

        txtsvemail2.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                txtsvemail2ActionPerformed(evt);
            }
        });

        jLabel83.setText("Quốc tịch: ");

        jLabel84.setText("Dân tộc: ");

        cbbsvlop2.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Item 1", "Item 2", "Item 3", "Item 4" }));

        jLabel66.setText("Lớp: ");

        jLabel67.setText("Ngày sinh: ");

        jLabel68.setText("Trạng thái: ");

        cbbsvtt2.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Enable", "Disable" }));

        jLabel70.setText("Khoa: ");

        cbbsvkhoa2.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Item 1", "Item 2", "Item 3", "Item 4" }));
        cbbsvkhoa2.addItemListener(new java.awt.event.ItemListener() {
            public void itemStateChanged(java.awt.event.ItemEvent evt) {
                cbbsvkhoa2ItemStateChanged(evt);
            }
        });

        jLabel163.setText("Khóa học: ");

        cbbsvkhoahoc2.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Item 1", "Item 2", "Item 3", "Item 4" }));
        cbbsvkhoahoc2.addItemListener(new java.awt.event.ItemListener() {
            public void itemStateChanged(java.awt.event.ItemEvent evt) {
                cbbsvkhoahoc2ItemStateChanged(evt);
            }
        });

        javax.swing.GroupLayout qlsvEditLayout = new javax.swing.GroupLayout(qlsvEdit);
        qlsvEdit.setLayout(qlsvEditLayout);
        qlsvEditLayout.setHorizontalGroup(
            qlsvEditLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(qlsvEditLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(qlsvEditLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(qlsvEditLayout.createSequentialGroup()
                        .addComponent(jLabel68)
                        .addGap(16, 16, 16)
                        .addComponent(cbbsvtt2, javax.swing.GroupLayout.PREFERRED_SIZE, 65, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(60, 60, 60)
                        .addComponent(btnsvcapnhat))
                    .addGroup(qlsvEditLayout.createSequentialGroup()
                        .addGroup(qlsvEditLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jLabel82)
                            .addComponent(jLabel79))
                        .addGap(16, 16, 16)
                        .addGroup(qlsvEditLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(txtsvdienthoai2, javax.swing.GroupLayout.PREFERRED_SIZE, 189, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(txtsvdiachi2, javax.swing.GroupLayout.DEFAULT_SIZE, 446, Short.MAX_VALUE)))
                    .addGroup(qlsvEditLayout.createSequentialGroup()
                        .addGroup(qlsvEditLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jLabel67)
                            .addComponent(jLabel83)
                            .addComponent(jLabel66))
                        .addGap(19, 19, 19)
                        .addGroup(qlsvEditLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(qlsvEditLayout.createSequentialGroup()
                                .addGroup(qlsvEditLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, qlsvEditLayout.createSequentialGroup()
                                        .addComponent(cbbsvlop2, 0, 199, Short.MAX_VALUE)
                                        .addGap(20, 20, 20)
                                        .addComponent(jLabel81)
                                        .addGap(17, 17, 17))
                                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, qlsvEditLayout.createSequentialGroup()
                                        .addComponent(jLabel84)
                                        .addGap(11, 11, 11)))
                                .addGroup(qlsvEditLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(txtsvdantoc2, javax.swing.GroupLayout.PREFERRED_SIZE, 164, javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addGroup(qlsvEditLayout.createSequentialGroup()
                                        .addGap(1, 1, 1)
                                        .addComponent(cbbsvgioitinh2, javax.swing.GroupLayout.PREFERRED_SIZE, 97, javax.swing.GroupLayout.PREFERRED_SIZE))))
                            .addGroup(qlsvEditLayout.createSequentialGroup()
                                .addGroup(qlsvEditLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(datesvngaysinh2, javax.swing.GroupLayout.DEFAULT_SIZE, 199, Short.MAX_VALUE)
                                    .addComponent(txtsvquoctich2, javax.swing.GroupLayout.DEFAULT_SIZE, 199, Short.MAX_VALUE))
                                .addGap(27, 27, 27)
                                .addGroup(qlsvEditLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                                    .addGroup(qlsvEditLayout.createSequentialGroup()
                                        .addComponent(jLabel78)
                                        .addGap(19, 19, 19)
                                        .addComponent(txtsvcmnd2))
                                    .addGroup(qlsvEditLayout.createSequentialGroup()
                                        .addComponent(jLabel80)
                                        .addGap(24, 24, 24)
                                        .addComponent(txtsvemail2, javax.swing.GroupLayout.PREFERRED_SIZE, 164, javax.swing.GroupLayout.PREFERRED_SIZE)))))))
                .addContainerGap())
            .addGroup(qlsvEditLayout.createSequentialGroup()
                .addGroup(qlsvEditLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(qlsvEditLayout.createSequentialGroup()
                        .addGap(9, 9, 9)
                        .addComponent(jLabel64))
                    .addGroup(qlsvEditLayout.createSequentialGroup()
                        .addContainerGap()
                        .addComponent(jLabel70)))
                .addGap(15, 15, 15)
                .addGroup(qlsvEditLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, qlsvEditLayout.createSequentialGroup()
                        .addComponent(cbbsvkhoa2, 0, 194, Short.MAX_VALUE)
                        .addGap(29, 29, 29)
                        .addComponent(jLabel163)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(cbbsvkhoahoc2, javax.swing.GroupLayout.PREFERRED_SIZE, 162, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addContainerGap())
                    .addGroup(qlsvEditLayout.createSequentialGroup()
                        .addComponent(txtsvsinhvienid, javax.swing.GroupLayout.PREFERRED_SIZE, 93, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(jLabel65)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(txtsvhoten2, javax.swing.GroupLayout.DEFAULT_SIZE, 268, Short.MAX_VALUE)
                        .addGap(11, 11, 11))))
        );
        qlsvEditLayout.setVerticalGroup(
            qlsvEditLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(qlsvEditLayout.createSequentialGroup()
                .addGroup(qlsvEditLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel64)
                    .addComponent(txtsvsinhvienid, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel65)
                    .addComponent(txtsvhoten2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(qlsvEditLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(qlsvEditLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                        .addComponent(jLabel70)
                        .addComponent(cbbsvkhoa2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(qlsvEditLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                        .addComponent(jLabel163)
                        .addComponent(cbbsvkhoahoc2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 31, Short.MAX_VALUE)
                .addGroup(qlsvEditLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, qlsvEditLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                        .addComponent(jLabel66)
                        .addComponent(cbbsvlop2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addComponent(jLabel81))
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, qlsvEditLayout.createSequentialGroup()
                        .addComponent(cbbsvgioitinh2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(3, 3, 3)))
                .addGroup(qlsvEditLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(qlsvEditLayout.createSequentialGroup()
                        .addGroup(qlsvEditLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(qlsvEditLayout.createSequentialGroup()
                                .addGap(4, 4, 4)
                                .addComponent(txtsvdantoc2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addGroup(qlsvEditLayout.createSequentialGroup()
                                .addGap(8, 8, 8)
                                .addComponent(jLabel84)))
                        .addGroup(qlsvEditLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(qlsvEditLayout.createSequentialGroup()
                                .addGap(9, 9, 9)
                                .addComponent(jLabel80))
                            .addGroup(qlsvEditLayout.createSequentialGroup()
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(txtsvemail2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))))
                    .addGroup(qlsvEditLayout.createSequentialGroup()
                        .addGroup(qlsvEditLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(qlsvEditLayout.createSequentialGroup()
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(jLabel67))
                            .addGroup(qlsvEditLayout.createSequentialGroup()
                                .addGap(5, 5, 5)
                                .addComponent(datesvngaysinh2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(qlsvEditLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(qlsvEditLayout.createSequentialGroup()
                                .addGap(6, 6, 6)
                                .addComponent(jLabel83))
                            .addGroup(qlsvEditLayout.createSequentialGroup()
                                .addGap(5, 5, 5)
                                .addComponent(txtsvquoctich2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))))
                .addGroup(qlsvEditLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(qlsvEditLayout.createSequentialGroup()
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(jLabel82))
                    .addGroup(qlsvEditLayout.createSequentialGroup()
                        .addGap(7, 7, 7)
                        .addGroup(qlsvEditLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(txtsvdienthoai2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jLabel78)))
                    .addGroup(qlsvEditLayout.createSequentialGroup()
                        .addGap(7, 7, 7)
                        .addComponent(txtsvcmnd2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(qlsvEditLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(txtsvdiachi2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel79))
                .addGroup(qlsvEditLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(qlsvEditLayout.createSequentialGroup()
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(jLabel68))
                    .addGroup(qlsvEditLayout.createSequentialGroup()
                        .addGap(7, 7, 7)
                        .addComponent(cbbsvtt2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(qlsvEditLayout.createSequentialGroup()
                        .addGap(18, 18, 18)
                        .addComponent(btnsvcapnhat)))
                .addGap(18, 18, 18))
        );

        qlk6.add(qlsvEdit, "card3");

        javax.swing.GroupLayout quanlikhoa7Layout = new javax.swing.GroupLayout(quanlikhoa7);
        quanlikhoa7.setLayout(quanlikhoa7Layout);
        quanlikhoa7Layout.setHorizontalGroup(
            quanlikhoa7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(quanlikhoa7Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(qlkthaotac7, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(qlk6, javax.swing.GroupLayout.DEFAULT_SIZE, 554, Short.MAX_VALUE)
                .addContainerGap())
        );
        quanlikhoa7Layout.setVerticalGroup(
            quanlikhoa7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(quanlikhoa7Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(quanlikhoa7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(qlk6, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(qlkthaotac7, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addContainerGap())
        );

        jLabel161.setText("Tìm kiếm: ");

        txtSearchSinhvien.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyPressed(java.awt.event.KeyEvent evt) {
                txtSearchSinhvienKeyPressed(evt);
            }
            public void keyReleased(java.awt.event.KeyEvent evt) {
                txtSearchSinhvienKeyReleased(evt);
            }
        });

        tableSinhvien.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null}
            },
            new String [] {
                "Title 1", "Title 2", "Title 3", "Title 4"
            }
        ));
        tableSinhvien.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                tableSinhvienMouseClicked(evt);
            }
        });
        jScrollPane7.setViewportView(tableSinhvien);

        javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
        jPanel1.setLayout(jPanel1Layout);
        jPanel1Layout.setHorizontalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()
                        .addComponent(jLabel161)
                        .addGap(32, 32, 32)
                        .addComponent(txtSearchSinhvien, javax.swing.GroupLayout.PREFERRED_SIZE, 423, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(61, 61, 61))
                    .addGroup(jPanel1Layout.createSequentialGroup()
                        .addComponent(jScrollPane7, javax.swing.GroupLayout.DEFAULT_SIZE, 670, Short.MAX_VALUE)
                        .addContainerGap())))
        );
        jPanel1Layout.setVerticalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(txtSearchSinhvien, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel161, javax.swing.GroupLayout.PREFERRED_SIZE, 20, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(18, 18, 18)
                .addComponent(jScrollPane7, javax.swing.GroupLayout.DEFAULT_SIZE, 205, Short.MAX_VALUE)
                .addContainerGap())
        );

        javax.swing.GroupLayout jPanel20Layout = new javax.swing.GroupLayout(jPanel20);
        jPanel20.setLayout(jPanel20Layout);
        jPanel20Layout.setHorizontalGroup(
            jPanel20Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(quanlikhoa7, javax.swing.GroupLayout.DEFAULT_SIZE, 733, Short.MAX_VALUE)
            .addGroup(jPanel20Layout.createSequentialGroup()
                .addGap(10, 10, 10)
                .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap())
        );
        jPanel20Layout.setVerticalGroup(
            jPanel20Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel20Layout.createSequentialGroup()
                .addComponent(quanlikhoa7, javax.swing.GroupLayout.PREFERRED_SIZE, 320, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(18, 18, 18)
                .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(26, Short.MAX_VALUE))
        );

        javax.swing.GroupLayout jPanel8Layout = new javax.swing.GroupLayout(jPanel8);
        jPanel8.setLayout(jPanel8Layout);
        jPanel8Layout.setHorizontalGroup(
            jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel8Layout.createSequentialGroup()
                .addComponent(jPanel20, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addContainerGap())
        );
        jPanel8Layout.setVerticalGroup(
            jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel8Layout.createSequentialGroup()
                .addComponent(jPanel20, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addContainerGap())
        );

        jTabbedPane1.addTab("", new javax.swing.ImageIcon(getClass().getResource("/Images/QUAN LY SINH VIEN.png")), jPanel8); // NOI18N

        jPanel9.addComponentListener(new java.awt.event.ComponentAdapter() {
            public void componentShown(java.awt.event.ComponentEvent evt) {
                jPanel9ComponentShown(evt);
            }
        });

        quanlikhoa8.setAlignmentX(0.0F);
        quanlikhoa8.setAlignmentY(0.0F);

        qlkthaotac8.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Thao tác", javax.swing.border.TitledBorder.LEFT, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Tahoma", 1, 12))); // NOI18N

        btngvdelete.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Images/Delete.png"))); // NOI18N
        btngvdelete.setText("Xóa");
        btngvdelete.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btngvdeleteActionPerformed(evt);
            }
        });

        btnCreate15.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Images/add.png"))); // NOI18N
        btnCreate15.setText("Thêm mới");
        btnCreate15.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnCreate15ActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout qlkthaotac8Layout = new javax.swing.GroupLayout(qlkthaotac8);
        qlkthaotac8.setLayout(qlkthaotac8Layout);
        qlkthaotac8Layout.setHorizontalGroup(
            qlkthaotac8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(qlkthaotac8Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(qlkthaotac8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(btnCreate15, javax.swing.GroupLayout.PREFERRED_SIZE, 121, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(btngvdelete, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 121, Short.MAX_VALUE))
                .addContainerGap())
        );
        qlkthaotac8Layout.setVerticalGroup(
            qlkthaotac8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(qlkthaotac8Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(btnCreate15)
                .addGap(18, 18, 18)
                .addComponent(btngvdelete)
                .addContainerGap(137, Short.MAX_VALUE))
        );

        qlk7.setLayout(new java.awt.CardLayout());

        qlgvCreate.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Thêm mới giảng viên", javax.swing.border.TitledBorder.LEFT, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Tahoma", 1, 12))); // NOI18N
        qlgvCreate.setAlignmentX(0.0F);
        qlgvCreate.setAlignmentY(0.0F);

        jLabel85.setText("Họ tên: ");

        jLabel86.setText("Trạng thái: ");

        btngvReset.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Images/refresh.png"))); // NOI18N
        btngvReset.setText("Reset");
        btngvReset.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btngvResetActionPerformed(evt);
            }
        });

        cbbgvtt1.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Enable", "Disable" }));

        btngvThem.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Images/add.png"))); // NOI18N
        btngvThem.setText("Thêm mới");
        btngvThem.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btngvThemActionPerformed(evt);
            }
        });

        jLabel87.setText("Khoa: ");

        cbbgvkhoa1.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Item 1", "Item 2", "Item 3", "Item 4" }));

        jLabel88.setText("Ngày sinh: ");

        jLabel89.setText("Giới tính: ");

        cbbgvgioitinh1.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Nam", "Nữ" }));

        jLabel90.setText("Dân tộc: ");

        jLabel91.setText("Quốc tịch: ");

        jLabel92.setText("Email: ");

        txtgvemail1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                txtgvemail1ActionPerformed(evt);
            }
        });

        jLabel93.setText("Điện thoại: ");

        jLabel94.setText("CMND: ");

        jLabel95.setText("Địa chỉ: ");

        jLabel110.setText("Học vị: ");

        javax.swing.GroupLayout qlgvCreateLayout = new javax.swing.GroupLayout(qlgvCreate);
        qlgvCreate.setLayout(qlgvCreateLayout);
        qlgvCreateLayout.setHorizontalGroup(
            qlgvCreateLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(qlgvCreateLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(qlgvCreateLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(qlgvCreateLayout.createSequentialGroup()
                        .addGroup(qlgvCreateLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jLabel88)
                            .addComponent(jLabel87)
                            .addComponent(jLabel85))
                        .addGap(17, 17, 17)
                        .addGroup(qlgvCreateLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                            .addComponent(txtgvhoten1, javax.swing.GroupLayout.PREFERRED_SIZE, 423, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addGroup(qlgvCreateLayout.createSequentialGroup()
                                .addComponent(cbbgvkhoa1, javax.swing.GroupLayout.PREFERRED_SIZE, 177, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addGap(27, 27, 27)
                                .addComponent(jLabel89)
                                .addGap(10, 10, 10)
                                .addComponent(cbbgvgioitinh1, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                            .addGroup(qlgvCreateLayout.createSequentialGroup()
                                .addComponent(dategvngaysinh1, javax.swing.GroupLayout.PREFERRED_SIZE, 177, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addGap(27, 27, 27)
                                .addComponent(jLabel90)
                                .addGap(11, 11, 11)
                                .addComponent(txtgvdantoc1))))
                    .addGroup(qlgvCreateLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                        .addGroup(javax.swing.GroupLayout.Alignment.LEADING, qlgvCreateLayout.createSequentialGroup()
                            .addComponent(jLabel91)
                            .addGap(19, 19, 19)
                            .addComponent(txtgvquoctich1, javax.swing.GroupLayout.PREFERRED_SIZE, 177, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addGap(27, 27, 27)
                            .addComponent(jLabel92)
                            .addGap(24, 24, 24)
                            .addComponent(txtgvemail1))
                        .addGroup(javax.swing.GroupLayout.Alignment.LEADING, qlgvCreateLayout.createSequentialGroup()
                            .addComponent(jLabel93)
                            .addGap(15, 15, 15)
                            .addComponent(txtgvdienthoai1, javax.swing.GroupLayout.PREFERRED_SIZE, 158, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addGap(46, 46, 46)
                            .addComponent(jLabel94)
                            .addGap(19, 19, 19)
                            .addComponent(txtgvcmnd1))
                        .addGroup(javax.swing.GroupLayout.Alignment.LEADING, qlgvCreateLayout.createSequentialGroup()
                            .addGroup(qlgvCreateLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                .addComponent(jLabel95)
                                .addComponent(jLabel110))
                            .addGap(32, 32, 32)
                            .addGroup(qlgvCreateLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                .addGroup(qlgvCreateLayout.createSequentialGroup()
                                    .addComponent(txtgvhocvi1, javax.swing.GroupLayout.PREFERRED_SIZE, 156, javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addGap(43, 43, 43)
                                    .addComponent(jLabel86)
                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                    .addComponent(cbbgvtt1, javax.swing.GroupLayout.PREFERRED_SIZE, 65, javax.swing.GroupLayout.PREFERRED_SIZE))
                                .addComponent(txtgvdiachi1, javax.swing.GroupLayout.PREFERRED_SIZE, 423, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addGroup(qlgvCreateLayout.createSequentialGroup()
                                    .addGap(54, 54, 54)
                                    .addComponent(btngvThem, javax.swing.GroupLayout.PREFERRED_SIZE, 134, javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addGap(18, 18, 18)
                                    .addComponent(btngvReset, javax.swing.GroupLayout.PREFERRED_SIZE, 105, javax.swing.GroupLayout.PREFERRED_SIZE))))))
                .addContainerGap(18, Short.MAX_VALUE))
        );
        qlgvCreateLayout.setVerticalGroup(
            qlgvCreateLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(qlgvCreateLayout.createSequentialGroup()
                .addGroup(qlgvCreateLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(qlgvCreateLayout.createSequentialGroup()
                        .addGap(3, 3, 3)
                        .addComponent(jLabel85))
                    .addComponent(txtgvhoten1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(7, 7, 7)
                .addGroup(qlgvCreateLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(cbbgvgioitinh1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(cbbgvkhoa1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addGroup(qlgvCreateLayout.createSequentialGroup()
                        .addGap(3, 3, 3)
                        .addComponent(jLabel87))
                    .addGroup(qlgvCreateLayout.createSequentialGroup()
                        .addGap(3, 3, 3)
                        .addComponent(jLabel89)))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(qlgvCreateLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(qlgvCreateLayout.createSequentialGroup()
                        .addGap(4, 4, 4)
                        .addGroup(qlgvCreateLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(qlgvCreateLayout.createSequentialGroup()
                                .addGap(2, 2, 2)
                                .addComponent(jLabel88))
                            .addGroup(qlgvCreateLayout.createSequentialGroup()
                                .addGap(4, 4, 4)
                                .addComponent(jLabel90))))
                    .addGroup(qlgvCreateLayout.createSequentialGroup()
                        .addGap(5, 5, 5)
                        .addComponent(dategvngaysinh1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(qlgvCreateLayout.createSequentialGroup()
                        .addGap(4, 4, 4)
                        .addComponent(txtgvdantoc1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(qlgvCreateLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(qlgvCreateLayout.createSequentialGroup()
                        .addGap(1, 1, 1)
                        .addComponent(jLabel91))
                    .addGroup(qlgvCreateLayout.createSequentialGroup()
                        .addGap(3, 3, 3)
                        .addComponent(jLabel92))
                    .addComponent(txtgvquoctich1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(txtgvemail1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(7, 7, 7)
                .addGroup(qlgvCreateLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(qlgvCreateLayout.createSequentialGroup()
                        .addGap(4, 4, 4)
                        .addComponent(jLabel93))
                    .addGroup(qlgvCreateLayout.createSequentialGroup()
                        .addGap(3, 3, 3)
                        .addComponent(jLabel94))
                    .addComponent(txtgvdienthoai1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(txtgvcmnd1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(qlgvCreateLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(txtgvdiachi1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel95, javax.swing.GroupLayout.PREFERRED_SIZE, 20, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(7, 7, 7)
                .addGroup(qlgvCreateLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(txtgvhocvi1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel110)
                    .addComponent(jLabel86)
                    .addComponent(cbbgvtt1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(6, 6, 6)
                .addGroup(qlgvCreateLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(btngvThem)
                    .addComponent(btngvReset)))
        );

        qlk7.add(qlgvCreate, "card2");

        qlgvEdit.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Cập nhật thông tin giảng viên", javax.swing.border.TitledBorder.LEFT, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Tahoma", 1, 12))); // NOI18N

        jLabel96.setText("GiangVienID: ");

        btngvCapnhat.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Images/update.png"))); // NOI18N
        btngvCapnhat.setText("Cập nhật");
        btngvCapnhat.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btngvCapnhatActionPerformed(evt);
            }
        });

        jLabel97.setText("Họ tên: ");

        jLabel98.setText("CMND: ");

        jLabel99.setText("Địa chỉ: ");

        jLabel100.setText("Email: ");

        cbbgvgioitinh2.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Nam", "Nữ" }));

        jLabel101.setText("Giới tính: ");

        jLabel102.setText("Điện thoại: ");

        txtgvemail2.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                txtgvemail2ActionPerformed(evt);
            }
        });

        jLabel103.setText("Quốc tịch: ");

        jLabel104.setText("Dân tộc: ");

        cbbgvkhoa2.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Item 1", "Item 2", "Item 3", "Item 4" }));

        jLabel105.setText("Khoa: ");

        jLabel106.setText("Ngày sinh: ");

        jLabel107.setText("Trạng thái: ");

        cbbgvtt2.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Enable", "Disable" }));

        jLabel111.setText("Học vị: ");

        javax.swing.GroupLayout qlgvEditLayout = new javax.swing.GroupLayout(qlgvEdit);
        qlgvEdit.setLayout(qlgvEditLayout);
        qlgvEditLayout.setHorizontalGroup(
            qlgvEditLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(qlgvEditLayout.createSequentialGroup()
                .addGap(10, 10, 10)
                .addGroup(qlgvEditLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(qlgvEditLayout.createSequentialGroup()
                        .addGap(1, 1, 1)
                        .addComponent(jLabel96))
                    .addComponent(jLabel105)
                    .addComponent(jLabel106)
                    .addComponent(jLabel102)
                    .addComponent(jLabel99)
                    .addGroup(qlgvEditLayout.createSequentialGroup()
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 1, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addComponent(jLabel103))
                    .addComponent(jLabel111))
                .addGap(15, 15, 15)
                .addGroup(qlgvEditLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(txtgvdiachi2, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 365, Short.MAX_VALUE)
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, qlgvEditLayout.createSequentialGroup()
                        .addGroup(qlgvEditLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(cbbgvkhoa2, javax.swing.GroupLayout.PREFERRED_SIZE, 155, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addGroup(qlgvEditLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                .addComponent(dategvNgaysinh2, javax.swing.GroupLayout.DEFAULT_SIZE, 155, Short.MAX_VALUE)
                                .addComponent(txtgvquoctich2, javax.swing.GroupLayout.DEFAULT_SIZE, 155, Short.MAX_VALUE)
                                .addComponent(txtgvdienthoai2, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 155, Short.MAX_VALUE)))
                        .addGap(8, 8, 8)
                        .addGroup(qlgvEditLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(qlgvEditLayout.createSequentialGroup()
                                .addGroup(qlgvEditLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, qlgvEditLayout.createSequentialGroup()
                                        .addComponent(jLabel101)
                                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED))
                                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, qlgvEditLayout.createSequentialGroup()
                                        .addComponent(jLabel104)
                                        .addGap(11, 11, 11)))
                                .addGroup(qlgvEditLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(cbbgvgioitinh2, javax.swing.GroupLayout.PREFERRED_SIZE, 83, javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addComponent(txtgvdantoc2, javax.swing.GroupLayout.PREFERRED_SIZE, 147, javax.swing.GroupLayout.PREFERRED_SIZE)))
                            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, qlgvEditLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                                .addGroup(qlgvEditLayout.createSequentialGroup()
                                    .addComponent(jLabel98)
                                    .addGap(19, 19, 19)
                                    .addComponent(txtgvcmnd2))
                                .addGroup(qlgvEditLayout.createSequentialGroup()
                                    .addComponent(jLabel100)
                                    .addGap(24, 24, 24)
                                    .addComponent(txtgvemail2, javax.swing.GroupLayout.PREFERRED_SIZE, 147, javax.swing.GroupLayout.PREFERRED_SIZE)))))
                    .addGroup(qlgvEditLayout.createSequentialGroup()
                        .addComponent(txtgvgvid, javax.swing.GroupLayout.PREFERRED_SIZE, 93, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(jLabel97)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(txtgvhoten2, javax.swing.GroupLayout.DEFAULT_SIZE, 219, Short.MAX_VALUE))
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, qlgvEditLayout.createSequentialGroup()
                        .addGroup(qlgvEditLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                            .addComponent(btngvCapnhat)
                            .addGroup(qlgvEditLayout.createSequentialGroup()
                                .addComponent(txtgvhocvi2, javax.swing.GroupLayout.PREFERRED_SIZE, 158, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 17, Short.MAX_VALUE)
                                .addComponent(jLabel107)))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(cbbgvtt2, javax.swing.GroupLayout.PREFERRED_SIZE, 65, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(59, 59, 59)))
                .addGap(92, 92, 92))
        );
        qlgvEditLayout.setVerticalGroup(
            qlgvEditLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(qlgvEditLayout.createSequentialGroup()
                .addGap(1, 1, 1)
                .addGroup(qlgvEditLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel96)
                    .addComponent(txtgvgvid, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel97)
                    .addComponent(txtgvhoten2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(4, 4, 4)
                .addGroup(qlgvEditLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(qlgvEditLayout.createSequentialGroup()
                        .addGroup(qlgvEditLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jLabel105)
                            .addComponent(cbbgvkhoa2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addGroup(qlgvEditLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(qlgvEditLayout.createSequentialGroup()
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(jLabel106))
                            .addGroup(qlgvEditLayout.createSequentialGroup()
                                .addGap(5, 5, 5)
                                .addComponent(dategvNgaysinh2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(qlgvEditLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jLabel103)
                            .addGroup(qlgvEditLayout.createSequentialGroup()
                                .addGap(5, 5, 5)
                                .addComponent(txtgvquoctich2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                        .addGap(5, 5, 5)
                        .addGroup(qlgvEditLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(txtgvdienthoai2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jLabel102)))
                    .addGroup(qlgvEditLayout.createSequentialGroup()
                        .addGroup(qlgvEditLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jLabel101)
                            .addComponent(cbbgvgioitinh2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addGroup(qlgvEditLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(qlgvEditLayout.createSequentialGroup()
                                .addGap(8, 8, 8)
                                .addComponent(jLabel104))
                            .addGroup(qlgvEditLayout.createSequentialGroup()
                                .addGap(4, 4, 4)
                                .addComponent(txtgvdantoc2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                        .addGroup(qlgvEditLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(qlgvEditLayout.createSequentialGroup()
                                .addGap(15, 15, 15)
                                .addComponent(jLabel100))
                            .addGroup(qlgvEditLayout.createSequentialGroup()
                                .addGap(6, 6, 6)
                                .addComponent(txtgvemail2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                        .addGap(7, 7, 7)
                        .addGroup(qlgvEditLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jLabel98)
                            .addComponent(txtgvcmnd2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(qlgvEditLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(txtgvdiachi2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel99))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(qlgvEditLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel107)
                    .addComponent(jLabel111)
                    .addComponent(txtgvhocvi2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(cbbgvtt2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(btngvCapnhat)
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        qlk7.add(qlgvEdit, "card3");

        javax.swing.GroupLayout quanlikhoa8Layout = new javax.swing.GroupLayout(quanlikhoa8);
        quanlikhoa8.setLayout(quanlikhoa8Layout);
        quanlikhoa8Layout.setHorizontalGroup(
            quanlikhoa8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(quanlikhoa8Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(qlkthaotac8, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(qlk7, javax.swing.GroupLayout.PREFERRED_SIZE, 538, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );
        quanlikhoa8Layout.setVerticalGroup(
            quanlikhoa8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(quanlikhoa8Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(quanlikhoa8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                    .addComponent(qlkthaotac8, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(qlk7, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 263, Short.MAX_VALUE))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        jLabel164.setText("Tìm kiếm: ");

        txtSearchGiangVien.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyPressed(java.awt.event.KeyEvent evt) {
                txtSearchGiangVienKeyPressed(evt);
            }
            public void keyReleased(java.awt.event.KeyEvent evt) {
                txtSearchGiangVienKeyReleased(evt);
            }
        });

        tableGiangVien.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null}
            },
            new String [] {
                "Title 1", "Title 2", "Title 3", "Title 4"
            }
        ));
        tableGiangVien.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                tableGiangVienMouseClicked(evt);
            }
        });
        jScrollPane8.setViewportView(tableGiangVien);

        javax.swing.GroupLayout jPanel28Layout = new javax.swing.GroupLayout(jPanel28);
        jPanel28.setLayout(jPanel28Layout);
        jPanel28Layout.setHorizontalGroup(
            jPanel28Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel28Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel28Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel28Layout.createSequentialGroup()
                        .addComponent(jLabel164)
                        .addGap(32, 32, 32)
                        .addComponent(txtSearchGiangVien, javax.swing.GroupLayout.PREFERRED_SIZE, 423, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(80, 80, 80))
                    .addGroup(jPanel28Layout.createSequentialGroup()
                        .addComponent(jScrollPane8, javax.swing.GroupLayout.DEFAULT_SIZE, 693, Short.MAX_VALUE)
                        .addContainerGap())))
        );
        jPanel28Layout.setVerticalGroup(
            jPanel28Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel28Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel28Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(txtSearchGiangVien, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel164, javax.swing.GroupLayout.PREFERRED_SIZE, 20, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jScrollPane8, javax.swing.GroupLayout.PREFERRED_SIZE, 241, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(26, Short.MAX_VALUE))
        );

        javax.swing.GroupLayout jPanel21Layout = new javax.swing.GroupLayout(jPanel21);
        jPanel21.setLayout(jPanel21Layout);
        jPanel21Layout.setHorizontalGroup(
            jPanel21Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel21Layout.createSequentialGroup()
                .addGroup(jPanel21Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel21Layout.createSequentialGroup()
                        .addGap(10, 10, 10)
                        .addComponent(jPanel28, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                    .addComponent(quanlikhoa8, javax.swing.GroupLayout.PREFERRED_SIZE, 713, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap())
        );
        jPanel21Layout.setVerticalGroup(
            jPanel21Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel21Layout.createSequentialGroup()
                .addComponent(quanlikhoa8, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jPanel28, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addGap(34, 34, 34))
        );

        javax.swing.GroupLayout jPanel9Layout = new javax.swing.GroupLayout(jPanel9);
        jPanel9.setLayout(jPanel9Layout);
        jPanel9Layout.setHorizontalGroup(
            jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel9Layout.createSequentialGroup()
                .addComponent(jPanel21, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addContainerGap())
        );
        jPanel9Layout.setVerticalGroup(
            jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel9Layout.createSequentialGroup()
                .addComponent(jPanel21, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addContainerGap())
        );

        jTabbedPane1.addTab("", new javax.swing.ImageIcon(getClass().getResource("/Images/QUAN LY GIANG VIEN.png")), jPanel9); // NOI18N

        jPanel10.addComponentListener(new java.awt.event.ComponentAdapter() {
            public void componentShown(java.awt.event.ComponentEvent evt) {
                jPanel10ComponentShown(evt);
            }
        });

        jLabel112.setText("Kỳ học: ");

        cbbtkbkhoa.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Item 1", "Item 2", "Item 3", "Item 4" }));
        cbbtkbkhoa.addItemListener(new java.awt.event.ItemListener() {
            public void itemStateChanged(java.awt.event.ItemEvent evt) {
                cbbtkbkhoaItemStateChanged(evt);
            }
        });

        jLabel113.setText("Khóa học: ");

        jLabel114.setText("Chọn khoa: ");

        cbbtkbkhoahoc.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Item 1", "Item 2", "Item 3", "Item 4" }));
        cbbtkbkhoahoc.addItemListener(new java.awt.event.ItemListener() {
            public void itemStateChanged(java.awt.event.ItemEvent evt) {
                cbbtkbkhoahocItemStateChanged(evt);
            }
        });

        cbbtkbky.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Item 1", "Item 2", "Item 3", "Item 4" }));
        cbbtkbky.addItemListener(new java.awt.event.ItemListener() {
            public void itemStateChanged(java.awt.event.ItemEvent evt) {
                cbbtkbkyItemStateChanged(evt);
            }
        });

        jLabel115.setText("Nhóm: ");

        cbbtkbnhom.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Item 1", "Item 2", "Item 3", "Item 4" }));
        cbbtkbnhom.addItemListener(new java.awt.event.ItemListener() {
            public void itemStateChanged(java.awt.event.ItemEvent evt) {
                cbbtkbnhomItemStateChanged(evt);
            }
        });

        tableThoiKhoaBieu.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null}
            },
            new String [] {
                "Title 1", "Title 2", "Title 3", "Title 4"
            }
        ));
        tableThoiKhoaBieu.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                tableThoiKhoaBieuMouseClicked(evt);
            }
        });
        jScrollPane9.setViewportView(tableThoiKhoaBieu);

        btnThemmoi.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Images/add.png"))); // NOI18N
        btnThemmoi.setText("Thêm mới");
        btnThemmoi.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnThemmoiActionPerformed(evt);
            }
        });
        jPanel4.add(btnThemmoi);

        btntkbDelete.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Images/Delete.png"))); // NOI18N
        btntkbDelete.setText("Xóa");
        btntkbDelete.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btntkbDeleteActionPerformed(evt);
            }
        });
        jPanel4.add(btntkbDelete);

        jPanel22.setLayout(new java.awt.CardLayout());

        qltkbCreate.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Thêm mới thời khóa biểu", javax.swing.border.TitledBorder.LEFT, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Tahoma", 1, 12))); // NOI18N

        jLabel165.setText("Môn học: ");

        jLabel166.setText("Trạng thái: ");

        cbbtkbtkt3.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12" }));
        cbbtkbtkt3.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                cbbtkbtkt3ActionPerformed(evt);
            }
        });

        btntkbThem.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Images/add.png"))); // NOI18N
        btntkbThem.setText("Thêm mới");
        btntkbThem.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btntkbThemActionPerformed(evt);
            }
        });

        jLabel167.setText("Giảng viên: ");

        cbbtkbgiangvien3.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Item 1", "Item 2", "Item 3", "Item 4" }));

        jLabel168.setText("Tiết bắt đầu:");

        jLabel169.setText("Tiết kết thúc:");

        cbbtkbmon3.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Item 1", "Item 2", "Item 3", "Item 4" }));

        cbbtkbthu3.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Thứ 2", "Thứ 3", "Thứ 4", "Thứ 5", "Thứ 6", "Thứ 7" }));

        jLabel170.setText("Phòng: ");

        cbbtkbtt3.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Enable", "Disable" }));

        jLabel171.setText("Thứ: ");

        cbbtkbtbd3.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12" }));
        cbbtkbtbd3.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                cbbtkbtbd3ActionPerformed(evt);
            }
        });

        jLabel172.setText("Tổng số buổi: ");

        javax.swing.GroupLayout qltkbCreateLayout = new javax.swing.GroupLayout(qltkbCreate);
        qltkbCreate.setLayout(qltkbCreateLayout);
        qltkbCreateLayout.setHorizontalGroup(
            qltkbCreateLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(qltkbCreateLayout.createSequentialGroup()
                .addGap(24, 24, 24)
                .addGroup(qltkbCreateLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addGroup(qltkbCreateLayout.createSequentialGroup()
                        .addGroup(qltkbCreateLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jLabel165)
                            .addComponent(jLabel170))
                        .addGap(25, 25, 25))
                    .addGroup(qltkbCreateLayout.createSequentialGroup()
                        .addComponent(jLabel168)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)))
                .addGroup(qltkbCreateLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addComponent(cbbtkbmon3, javax.swing.GroupLayout.PREFERRED_SIZE, 212, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addGroup(qltkbCreateLayout.createSequentialGroup()
                        .addGroup(qltkbCreateLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(txttkbphong3, javax.swing.GroupLayout.PREFERRED_SIZE, 73, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(cbbtkbtbd3, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addGap(18, 18, 18)
                        .addGroup(qltkbCreateLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(qltkbCreateLayout.createSequentialGroup()
                                .addComponent(jLabel169)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                .addComponent(cbbtkbtkt3, 0, 47, Short.MAX_VALUE))
                            .addGroup(qltkbCreateLayout.createSequentialGroup()
                                .addComponent(jLabel171)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                .addComponent(cbbtkbthu3, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 46, Short.MAX_VALUE)
                .addGroup(qltkbCreateLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabel172)
                    .addComponent(jLabel167)
                    .addComponent(jLabel166))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(qltkbCreateLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addComponent(cbbtkbtt3, javax.swing.GroupLayout.PREFERRED_SIZE, 88, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addGroup(qltkbCreateLayout.createSequentialGroup()
                        .addComponent(txttkbtong3, javax.swing.GroupLayout.PREFERRED_SIZE, 88, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(117, 117, 117))
                    .addComponent(cbbtkbgiangvien3, javax.swing.GroupLayout.Alignment.TRAILING, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addGap(51, 51, 51))
            .addGroup(qltkbCreateLayout.createSequentialGroup()
                .addGap(247, 247, 247)
                .addComponent(btntkbThem, javax.swing.GroupLayout.PREFERRED_SIZE, 134, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(307, Short.MAX_VALUE))
        );
        qltkbCreateLayout.setVerticalGroup(
            qltkbCreateLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(qltkbCreateLayout.createSequentialGroup()
                .addGroup(qltkbCreateLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, qltkbCreateLayout.createSequentialGroup()
                        .addGroup(qltkbCreateLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jLabel167)
                            .addComponent(cbbtkbgiangvien3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jLabel165)
                            .addComponent(cbbtkbmon3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(qltkbCreateLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(txttkbphong3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jLabel170)
                            .addComponent(jLabel171)
                            .addComponent(cbbtkbthu3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(txttkbtong3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jLabel172))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(qltkbCreateLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jLabel166)
                            .addComponent(cbbtkbtt3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(cbbtkbtkt3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jLabel169)))
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, qltkbCreateLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                        .addComponent(cbbtkbtbd3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addComponent(jLabel168)))
                .addGap(18, 18, 18)
                .addComponent(btntkbThem)
                .addGap(23, 23, 23))
        );

        jPanel22.add(qltkbCreate, "card2");

        qltkbEdit.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Cập nhật thời khóa biểu", javax.swing.border.TitledBorder.LEFT, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Tahoma", 1, 12))); // NOI18N

        jLabel123.setText("Môn học: ");

        jLabel124.setText("Trạng thái: ");

        cbbtkbtkt2.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12" }));
        cbbtkbtkt2.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                cbbtkbtkt2ActionPerformed(evt);
            }
        });

        btntkbCapNhat.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Images/add.png"))); // NOI18N
        btntkbCapNhat.setText("Cập nhật");
        btntkbCapNhat.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btntkbCapNhatActionPerformed(evt);
            }
        });

        jLabel125.setText("Giảng viên: ");

        cbbtkbgiangvien2.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Item 1", "Item 2", "Item 3", "Item 4" }));

        jLabel126.setText("Tiết bắt đầu:");

        jLabel127.setText("Tiết kết thúc:");

        cbbtkbmon2.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Item 1", "Item 2", "Item 3", "Item 4" }));

        cbbtkbthu2.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Thứ 2", "Thứ 3", "Thứ 4", "Thứ 5", "Thứ 6", "Thứ 7" }));

        jLabel128.setText("Phòng: ");

        cbbtkbtt2.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Enable", "Disable" }));

        jLabel129.setText("Thứ: ");

        jLabel130.setText("TKBID: ");

        cbbtkbtbd2.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12" }));
        cbbtkbtbd2.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                cbbtkbtbd2ActionPerformed(evt);
            }
        });

        jLabel173.setText("Tổng số buổi: ");

        javax.swing.GroupLayout qltkbEditLayout = new javax.swing.GroupLayout(qltkbEdit);
        qltkbEdit.setLayout(qltkbEditLayout);
        qltkbEditLayout.setHorizontalGroup(
            qltkbEditLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(qltkbEditLayout.createSequentialGroup()
                .addGap(247, 247, 247)
                .addComponent(btntkbCapNhat, javax.swing.GroupLayout.PREFERRED_SIZE, 134, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(307, Short.MAX_VALUE))
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, qltkbEditLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(qltkbEditLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addGroup(javax.swing.GroupLayout.Alignment.LEADING, qltkbEditLayout.createSequentialGroup()
                        .addComponent(jLabel130)
                        .addGap(50, 50, 50)
                        .addComponent(txttkbtkbid, javax.swing.GroupLayout.DEFAULT_SIZE, 196, Short.MAX_VALUE))
                    .addGroup(javax.swing.GroupLayout.Alignment.LEADING, qltkbEditLayout.createSequentialGroup()
                        .addComponent(jLabel126)
                        .addGap(24, 24, 24)
                        .addComponent(cbbtkbtbd2, 0, 77, Short.MAX_VALUE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jLabel127)
                        .addGap(2, 2, 2)
                        .addComponent(cbbtkbtkt2, javax.swing.GroupLayout.PREFERRED_SIZE, 49, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(qltkbEditLayout.createSequentialGroup()
                        .addComponent(jLabel123)
                        .addGap(38, 38, 38)
                        .addComponent(cbbtkbmon2, 0, 197, Short.MAX_VALUE)))
                .addGap(10, 10, 10)
                .addGroup(qltkbEditLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, qltkbEditLayout.createSequentialGroup()
                        .addComponent(jLabel125)
                        .addGap(29, 29, 29))
                    .addComponent(jLabel173)
                    .addComponent(jLabel128))
                .addGap(18, 18, 18)
                .addGroup(qltkbEditLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, qltkbEditLayout.createSequentialGroup()
                        .addComponent(txttkbtong2)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(jLabel124)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(cbbtkbtt2, javax.swing.GroupLayout.PREFERRED_SIZE, 69, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, qltkbEditLayout.createSequentialGroup()
                        .addComponent(txttkbphong2)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(jLabel129)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(cbbtkbthu2, javax.swing.GroupLayout.PREFERRED_SIZE, 91, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addComponent(cbbtkbgiangvien2, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 238, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(44, 44, 44))
        );
        qltkbEditLayout.setVerticalGroup(
            qltkbEditLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(qltkbEditLayout.createSequentialGroup()
                .addGroup(qltkbEditLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(qltkbEditLayout.createSequentialGroup()
                        .addGroup(qltkbEditLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jLabel125)
                            .addGroup(qltkbEditLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                .addComponent(txttkbtkbid, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addComponent(jLabel130)))
                        .addGroup(qltkbEditLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(qltkbEditLayout.createSequentialGroup()
                                .addGap(9, 9, 9)
                                .addGroup(qltkbEditLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(cbbtkbmon2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addComponent(jLabel128)))
                            .addGroup(qltkbEditLayout.createSequentialGroup()
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                .addComponent(jLabel123)))
                        .addGroup(qltkbEditLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(qltkbEditLayout.createSequentialGroup()
                                .addGap(10, 10, 10)
                                .addGroup(qltkbEditLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                    .addComponent(cbbtkbtbd2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addComponent(jLabel126)
                                    .addComponent(cbbtkbtkt2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addComponent(jLabel127)))
                            .addGroup(qltkbEditLayout.createSequentialGroup()
                                .addGap(12, 12, 12)
                                .addComponent(jLabel173)))
                        .addGap(11, 11, 11)
                        .addComponent(btntkbCapNhat))
                    .addGroup(qltkbEditLayout.createSequentialGroup()
                        .addComponent(cbbtkbgiangvien2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(9, 9, 9)
                        .addGroup(qltkbEditLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(txttkbphong2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jLabel129)
                            .addComponent(cbbtkbthu2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addGap(10, 10, 10)
                        .addGroup(qltkbEditLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jLabel124)
                            .addComponent(cbbtkbtt2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(txttkbtong2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))))
                .addContainerGap(28, Short.MAX_VALUE))
        );

        jPanel22.add(qltkbEdit, "card2");

        javax.swing.GroupLayout jPanel10Layout = new javax.swing.GroupLayout(jPanel10);
        jPanel10.setLayout(jPanel10Layout);
        jPanel10Layout.setHorizontalGroup(
            jPanel10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel10Layout.createSequentialGroup()
                .addGroup(jPanel10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                    .addGroup(jPanel10Layout.createSequentialGroup()
                        .addContainerGap()
                        .addComponent(jPanel4, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                    .addGroup(javax.swing.GroupLayout.Alignment.LEADING, jPanel10Layout.createSequentialGroup()
                        .addContainerGap()
                        .addComponent(jPanel22, 0, 0, Short.MAX_VALUE))
                    .addGroup(javax.swing.GroupLayout.Alignment.LEADING, jPanel10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                        .addGroup(jPanel10Layout.createSequentialGroup()
                            .addGap(145, 145, 145)
                            .addGroup(jPanel10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                .addComponent(jLabel114)
                                .addGroup(jPanel10Layout.createSequentialGroup()
                                    .addGap(4, 4, 4)
                                    .addComponent(jLabel112)))
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                            .addGroup(jPanel10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                .addComponent(cbbtkbky, javax.swing.GroupLayout.PREFERRED_SIZE, 83, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addComponent(cbbtkbkhoa, javax.swing.GroupLayout.PREFERRED_SIZE, 184, javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                            .addGroup(jPanel10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                .addComponent(jLabel113)
                                .addComponent(jLabel115))
                            .addGap(8, 8, 8)
                            .addGroup(jPanel10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                                .addComponent(cbbtkbnhom, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                .addComponent(cbbtkbkhoahoc, javax.swing.GroupLayout.PREFERRED_SIZE, 122, javax.swing.GroupLayout.PREFERRED_SIZE)))
                        .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel10Layout.createSequentialGroup()
                            .addGap(22, 22, 22)
                            .addComponent(jScrollPane9, javax.swing.GroupLayout.PREFERRED_SIZE, 692, javax.swing.GroupLayout.PREFERRED_SIZE))))
                .addContainerGap())
        );
        jPanel10Layout.setVerticalGroup(
            jPanel10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel10Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(cbbtkbkhoa, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel114)
                    .addComponent(cbbtkbkhoahoc, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel113))
                .addGap(18, 18, 18)
                .addGroup(jPanel10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(cbbtkbky, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel112)
                    .addComponent(cbbtkbnhom, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel115))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(jScrollPane9, javax.swing.GroupLayout.PREFERRED_SIZE, 269, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addComponent(jPanel4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jPanel22, javax.swing.GroupLayout.PREFERRED_SIZE, 182, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(175, 175, 175))
        );

        jTabbedPane1.addTab("", new javax.swing.ImageIcon(getClass().getResource("/Images/QUAN LY THOI KHOA BIEU.png")), jPanel10); // NOI18N

        jPanel31.addComponentListener(new java.awt.event.ComponentAdapter() {
            public void componentShown(java.awt.event.ComponentEvent evt) {
                jPanel31ComponentShown(evt);
            }
        });

        cbbpnnhom.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Item 1", "Item 2", "Item 3", "Item 4" }));
        cbbpnnhom.addItemListener(new java.awt.event.ItemListener() {
            public void itemStateChanged(java.awt.event.ItemEvent evt) {
                cbbpnnhomItemStateChanged(evt);
            }
        });

        jLabel116.setText("Nhóm: ");

        cbbpnkhoa.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Item 1", "Item 2", "Item 3", "Item 4" }));
        cbbpnkhoa.addItemListener(new java.awt.event.ItemListener() {
            public void itemStateChanged(java.awt.event.ItemEvent evt) {
                cbbpnkhoaItemStateChanged(evt);
            }
        });

        jLabel117.setText("Khóa học: ");

        jLabel118.setText("Chọn khoa: ");

        cbbpnkhoahoc.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Item 1", "Item 2", "Item 3", "Item 4" }));
        cbbpnkhoahoc.addItemListener(new java.awt.event.ItemListener() {
            public void itemStateChanged(java.awt.event.ItemEvent evt) {
                cbbpnkhoahocItemStateChanged(evt);
            }
        });

        cbbpnmon.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Item 1", "Item 2", "Item 3", "Item 4" }));
        cbbpnmon.addItemListener(new java.awt.event.ItemListener() {
            public void itemStateChanged(java.awt.event.ItemEvent evt) {
                cbbpnmonItemStateChanged(evt);
            }
        });

        jLabel119.setText("Môn:");

        cbbpnlop.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Item 1", "Item 2", "Item 3", "Item 4" }));
        cbbpnlop.addItemListener(new java.awt.event.ItemListener() {
            public void itemStateChanged(java.awt.event.ItemEvent evt) {
                cbbpnlopItemStateChanged(evt);
            }
        });

        jLabel120.setText("Lớp: ");

        tableSinhVienLop.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null}
            },
            new String [] {
                "Title 1", "Title 2", "Title 3", "Title 4"
            }
        ));
        jScrollPane13.setViewportView(tableSinhVienLop);

        tableSinhVienNhom.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null}
            },
            new String [] {
                "Title 1", "Title 2", "Title 3", "Title 4"
            }
        ));
        jScrollPane14.setViewportView(tableSinhVienNhom);

        btnpnthem.setText("Thêm");
        btnpnthem.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnpnthemActionPerformed(evt);
            }
        });

        btnpnxoa.setText("Xóa");
        btnpnxoa.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnpnxoaActionPerformed(evt);
            }
        });

        jLabel121.setText("Khóa học:");

        cbbpnkhoahoc1.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Item 1", "Item 2", "Item 3", "Item 4" }));
        cbbpnkhoahoc1.addItemListener(new java.awt.event.ItemListener() {
            public void itemStateChanged(java.awt.event.ItemEvent evt) {
                cbbpnkhoahoc1ItemStateChanged(evt);
            }
        });

        cbbpnkyhoc.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Item 1", "Item 2", "Item 3", "Item 4" }));
        cbbpnkyhoc.addItemListener(new java.awt.event.ItemListener() {
            public void itemStateChanged(java.awt.event.ItemEvent evt) {
                cbbpnkyhocItemStateChanged(evt);
            }
        });

        jLabel122.setText("Kỳ học: ");

        javax.swing.GroupLayout jPanel31Layout = new javax.swing.GroupLayout(jPanel31);
        jPanel31.setLayout(jPanel31Layout);
        jPanel31Layout.setHorizontalGroup(
            jPanel31Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel31Layout.createSequentialGroup()
                .addGap(214, 214, 214)
                .addComponent(jLabel118)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(cbbpnkhoa, 0, 254, Short.MAX_VALUE)
                .addGap(289, 289, 289))
            .addGroup(jPanel31Layout.createSequentialGroup()
                .addGroup(jPanel31Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel31Layout.createSequentialGroup()
                        .addGap(18, 18, 18)
                        .addComponent(jLabel117)
                        .addGap(8, 8, 8)
                        .addComponent(cbbpnkhoahoc, javax.swing.GroupLayout.PREFERRED_SIZE, 95, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(18, 18, 18)
                        .addComponent(jLabel120)
                        .addGap(26, 26, 26)
                        .addComponent(cbbpnlop, javax.swing.GroupLayout.PREFERRED_SIZE, 102, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(jPanel31Layout.createSequentialGroup()
                        .addContainerGap()
                        .addComponent(jScrollPane13, 0, 0, Short.MAX_VALUE)))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel31Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel31Layout.createSequentialGroup()
                        .addGroup(jPanel31Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                            .addComponent(jLabel116, javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jLabel121, javax.swing.GroupLayout.Alignment.LEADING))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(jPanel31Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                            .addComponent(cbbpnnhom, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .addComponent(cbbpnkhoahoc1, 0, 60, Short.MAX_VALUE))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(jPanel31Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jLabel122)
                            .addComponent(jLabel119))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(jPanel31Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                            .addComponent(cbbpnmon, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .addComponent(cbbpnkyhoc, javax.swing.GroupLayout.PREFERRED_SIZE, 69, javax.swing.GroupLayout.PREFERRED_SIZE)))
                    .addComponent(jScrollPane14, javax.swing.GroupLayout.PREFERRED_SIZE, 351, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(120, 120, 120))
            .addGroup(jPanel31Layout.createSequentialGroup()
                .addGap(142, 142, 142)
                .addComponent(btnpnthem)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 298, Short.MAX_VALUE)
                .addComponent(btnpnxoa)
                .addGap(269, 269, 269))
        );
        jPanel31Layout.setVerticalGroup(
            jPanel31Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel31Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel31Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(cbbpnkhoa, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel118))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel31Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel31Layout.createSequentialGroup()
                        .addGap(37, 37, 37)
                        .addGroup(jPanel31Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(cbbpnlop, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(cbbpnkhoahoc, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jLabel117)
                            .addComponent(jLabel120)))
                    .addGroup(jPanel31Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                        .addGroup(jPanel31Layout.createSequentialGroup()
                            .addGroup(jPanel31Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                .addComponent(cbbpnkyhoc, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addComponent(jLabel122))
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                            .addGroup(jPanel31Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                .addComponent(jLabel119)
                                .addComponent(cbbpnmon, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                        .addGroup(jPanel31Layout.createSequentialGroup()
                            .addGroup(jPanel31Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                .addComponent(cbbpnkhoahoc1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addComponent(jLabel121))
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                            .addGroup(jPanel31Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                .addComponent(jLabel116)
                                .addComponent(cbbpnnhom, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))))
                .addGap(18, 18, 18)
                .addGroup(jPanel31Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addComponent(jScrollPane14)
                    .addComponent(jScrollPane13))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(jPanel31Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(btnpnthem)
                    .addComponent(btnpnxoa))
                .addContainerGap(71, Short.MAX_VALUE))
        );

        jTabbedPane1.addTab("", new javax.swing.ImageIcon(getClass().getResource("/Images/PHANNHOM.png")), jPanel31); // NOI18N

        jPanel11.addComponentListener(new java.awt.event.ComponentAdapter() {
            public void componentShown(java.awt.event.ComponentEvent evt) {
                jPanel11ComponentShown(evt);
            }
        });

        btnCreate20.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Images/add.png"))); // NOI18N
        btnCreate20.setText("Danh sách SV nộp phạt");
        btnCreate20.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnCreate20ActionPerformed(evt);
            }
        });
        jPanel29.add(btnCreate20);

        btnddds1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Images/Delete.png"))); // NOI18N
        btnddds1.setText("Danh sách SV được thi");
        btnddds1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnddds1ActionPerformed(evt);
            }
        });
        jPanel29.add(btnddds1);

        btnCreate21.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Images/add.png"))); // NOI18N
        btnCreate21.setText("Danh sách SV không được thi");
        btnCreate21.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnCreate21ActionPerformed(evt);
            }
        });
        jPanel29.add(btnCreate21);

        jLabel131.setText("Kỳ học:     ");

        jLabel132.setText("Khóa học: ");

        cbbddkhoa.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Item 1", "Item 2", "Item 3", "Item 4" }));
        cbbddkhoa.addItemListener(new java.awt.event.ItemListener() {
            public void itemStateChanged(java.awt.event.ItemEvent evt) {
                cbbddkhoaItemStateChanged(evt);
            }
        });

        jLabel136.setText("Chọn ngày: ");

        cbbddmonhoc.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Item 1", "Item 2", "Item 3", "Item 4" }));
        cbbddmonhoc.addItemListener(new java.awt.event.ItemListener() {
            public void itemStateChanged(java.awt.event.ItemEvent evt) {
                cbbddmonhocItemStateChanged(evt);
            }
        });

        cbbddngay.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Item 1", "Item 2", "Item 3", "Item 4" }));
        cbbddngay.addItemListener(new java.awt.event.ItemListener() {
            public void itemStateChanged(java.awt.event.ItemEvent evt) {
                cbbddngayItemStateChanged(evt);
            }
        });

        jLabel133.setText("Chọn khoa: ");

        cbbddnhom.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Item 1", "Item 2", "Item 3", "Item 4" }));
        cbbddnhom.addItemListener(new java.awt.event.ItemListener() {
            public void itemStateChanged(java.awt.event.ItemEvent evt) {
                cbbddnhomItemStateChanged(evt);
            }
        });

        cbbddkhoahoc.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Item 1", "Item 2", "Item 3", "Item 4" }));
        cbbddkhoahoc.addItemListener(new java.awt.event.ItemListener() {
            public void itemStateChanged(java.awt.event.ItemEvent evt) {
                cbbddkhoahocItemStateChanged(evt);
            }
        });

        jLabel135.setText("Môn học:  ");

        cbbddkyhoc.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Item 1", "Item 2", "Item 3", "Item 4" }));
        cbbddkyhoc.addItemListener(new java.awt.event.ItemListener() {
            public void itemStateChanged(java.awt.event.ItemEvent evt) {
                cbbddkyhocItemStateChanged(evt);
            }
        });

        jLabel134.setText("Nhóm:      ");

        tableDiemDanh.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null}
            },
            new String [] {
                "Title 1", "Title 2", "Title 3", "Title 4"
            }
        ));
        jScrollPane10.setViewportView(tableDiemDanh);

        btnddSave.setText("Save");
        btnddSave.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnddSaveActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout jPanel30Layout = new javax.swing.GroupLayout(jPanel30);
        jPanel30.setLayout(jPanel30Layout);
        jPanel30Layout.setHorizontalGroup(
            jPanel30Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel30Layout.createSequentialGroup()
                .addGroup(jPanel30Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel30Layout.createSequentialGroup()
                        .addContainerGap()
                        .addGroup(jPanel30Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jLabel133)
                            .addComponent(jLabel134))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(jPanel30Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(cbbddnhom, javax.swing.GroupLayout.PREFERRED_SIZE, 80, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(cbbddkhoa, javax.swing.GroupLayout.PREFERRED_SIZE, 174, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addGroup(jPanel30Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jLabel132)
                            .addComponent(jLabel135))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(jPanel30Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                            .addComponent(cbbddmonhoc, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .addComponent(cbbddkhoahoc, 0, 114, Short.MAX_VALUE))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addGroup(jPanel30Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                            .addGroup(jPanel30Layout.createSequentialGroup()
                                .addComponent(jLabel131)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                .addComponent(cbbddkyhoc, javax.swing.GroupLayout.PREFERRED_SIZE, 127, javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addGroup(jPanel30Layout.createSequentialGroup()
                                .addComponent(jLabel136)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(cbbddngay, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))))
                    .addGroup(jPanel30Layout.createSequentialGroup()
                        .addGap(309, 309, 309)
                        .addComponent(btnddSave))
                    .addComponent(jScrollPane10, javax.swing.GroupLayout.DEFAULT_SIZE, 623, Short.MAX_VALUE))
                .addContainerGap())
        );
        jPanel30Layout.setVerticalGroup(
            jPanel30Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel30Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel30Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel30Layout.createSequentialGroup()
                        .addGroup(jPanel30Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jLabel133)
                            .addComponent(cbbddkhoa, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jLabel132)
                            .addComponent(cbbddkhoahoc, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addGap(18, 18, 18)
                        .addGroup(jPanel30Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(cbbddnhom, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jLabel134)
                            .addComponent(jLabel135)
                            .addComponent(cbbddmonhoc, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                    .addGroup(jPanel30Layout.createSequentialGroup()
                        .addGroup(jPanel30Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jLabel131)
                            .addComponent(cbbddkyhoc, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addGap(18, 18, 18)
                        .addGroup(jPanel30Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jLabel136)
                            .addComponent(cbbddngay, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))))
                .addGap(11, 11, 11)
                .addComponent(jScrollPane10, javax.swing.GroupLayout.DEFAULT_SIZE, 409, Short.MAX_VALUE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(btnddSave)
                .addContainerGap())
        );

        javax.swing.GroupLayout jPanel11Layout = new javax.swing.GroupLayout(jPanel11);
        jPanel11.setLayout(jPanel11Layout);
        jPanel11Layout.setHorizontalGroup(
            jPanel11Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel11Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel11Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(jPanel30, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(jPanel29, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 633, Short.MAX_VALUE))
                .addGap(110, 110, 110))
        );
        jPanel11Layout.setVerticalGroup(
            jPanel11Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel11Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jPanel30, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(jPanel29, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(41, Short.MAX_VALUE))
        );

        jTabbedPane1.addTab("", new javax.swing.ImageIcon(getClass().getResource("/Images/QUAN LY DIEM DANH.png")), jPanel11); // NOI18N

        jPanel12.addComponentListener(new java.awt.event.ComponentAdapter() {
            public void componentShown(java.awt.event.ComponentEvent evt) {
                jPanel12ComponentShown(evt);
            }
        });

        cbbtpkyhoc.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Item 1", "Item 2", "Item 3", "Item 4" }));
        cbbtpkyhoc.addItemListener(new java.awt.event.ItemListener() {
            public void itemStateChanged(java.awt.event.ItemEvent evt) {
                cbbtpkyhocItemStateChanged(evt);
            }
        });

        jLabel149.setText("Lớp:       ");

        jLabel150.setText("Chọn khoa: ");

        cbbtpkhoahoc.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Item 1", "Item 2", "Item 3", "Item 4" }));
        cbbtpkhoahoc.addItemListener(new java.awt.event.ItemListener() {
            public void itemStateChanged(java.awt.event.ItemEvent evt) {
                cbbtpkhoahocItemStateChanged(evt);
            }
        });

        cbbtpkhoa.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Item 1", "Item 2", "Item 3", "Item 4" }));
        cbbtpkhoa.addItemListener(new java.awt.event.ItemListener() {
            public void itemStateChanged(java.awt.event.ItemEvent evt) {
                cbbtpkhoaItemStateChanged(evt);
            }
        });

        jLabel152.setText("Khóa học:   ");

        jLabel153.setText("Danh sách: ");

        cbbtpdanhsach.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Danh sách nộp phạt", "Danh sách thi", "Danh sách không được thi" }));
        cbbtpdanhsach.addItemListener(new java.awt.event.ItemListener() {
            public void itemStateChanged(java.awt.event.ItemEvent evt) {
                cbbtpdanhsachItemStateChanged(evt);
            }
        });

        jLabel154.setText("Kỳ học:     ");

        cbbtplop.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Item 1", "Item 2", "Item 3", "Item 4" }));
        cbbtplop.addItemListener(new java.awt.event.ItemListener() {
            public void itemStateChanged(java.awt.event.ItemEvent evt) {
                cbbtplopItemStateChanged(evt);
            }
        });

        tableFine.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null}
            },
            new String [] {
                "Title 1", "Title 2", "Title 3", "Title 4"
            }
        ));
        jScrollPane11.setViewportView(tableFine);

        jLabel151.setText("Search: ");

        txttpSearch.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyPressed(java.awt.event.KeyEvent evt) {
                txttpSearchKeyPressed(evt);
            }
            public void keyReleased(java.awt.event.KeyEvent evt) {
                txttpSearchKeyReleased(evt);
            }
        });

        btntpCapNhat.setText("Cập nhật");
        btntpCapNhat.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btntpCapNhatActionPerformed(evt);
            }
        });
        jPanel24.add(btntpCapNhat);

        jButton28.setText("In danh sách");
        jPanel24.add(jButton28);

        jLabel174.setText("Nhóm:");

        cbbtpnhom.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Item 1", "Item 2", "Item 3", "Item 4" }));
        cbbtpnhom.addItemListener(new java.awt.event.ItemListener() {
            public void itemStateChanged(java.awt.event.ItemEvent evt) {
                cbbtpnhomItemStateChanged(evt);
            }
        });

        javax.swing.GroupLayout jPanel12Layout = new javax.swing.GroupLayout(jPanel12);
        jPanel12.setLayout(jPanel12Layout);
        jPanel12Layout.setHorizontalGroup(
            jPanel12Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel12Layout.createSequentialGroup()
                .addGroup(jPanel12Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel12Layout.createSequentialGroup()
                        .addGap(28, 28, 28)
                        .addGroup(jPanel12Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                            .addGroup(jPanel12Layout.createSequentialGroup()
                                .addComponent(jLabel149)
                                .addGap(16, 16, 16))
                            .addGroup(jPanel12Layout.createSequentialGroup()
                                .addComponent(jLabel150)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)))
                        .addGroup(jPanel12Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(jPanel12Layout.createSequentialGroup()
                                .addGap(58, 58, 58)
                                .addComponent(jLabel151)
                                .addGap(1, 1, 1)
                                .addComponent(txttpSearch, javax.swing.GroupLayout.PREFERRED_SIZE, 316, javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addGroup(jPanel12Layout.createSequentialGroup()
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addGroup(jPanel12Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                                    .addGroup(javax.swing.GroupLayout.Alignment.LEADING, jPanel12Layout.createSequentialGroup()
                                        .addComponent(cbbtplop, javax.swing.GroupLayout.PREFERRED_SIZE, 101, javax.swing.GroupLayout.PREFERRED_SIZE)
                                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                        .addComponent(jLabel174)
                                        .addGap(18, 18, 18)
                                        .addComponent(cbbtpnhom, javax.swing.GroupLayout.PREFERRED_SIZE, 98, javax.swing.GroupLayout.PREFERRED_SIZE)
                                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                        .addComponent(jLabel153)
                                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                        .addComponent(cbbtpdanhsach, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                                    .addGroup(javax.swing.GroupLayout.Alignment.LEADING, jPanel12Layout.createSequentialGroup()
                                        .addComponent(cbbtpkhoa, javax.swing.GroupLayout.PREFERRED_SIZE, 176, javax.swing.GroupLayout.PREFERRED_SIZE)
                                        .addGap(18, 18, 18)
                                        .addComponent(jLabel152)
                                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                        .addComponent(cbbtpkhoahoc, javax.swing.GroupLayout.PREFERRED_SIZE, 108, javax.swing.GroupLayout.PREFERRED_SIZE)
                                        .addGap(18, 18, 18)
                                        .addComponent(jLabel154)
                                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                        .addComponent(cbbtpkyhoc, javax.swing.GroupLayout.PREFERRED_SIZE, 84, javax.swing.GroupLayout.PREFERRED_SIZE)))))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 121, Short.MAX_VALUE))
                    .addGroup(jPanel12Layout.createSequentialGroup()
                        .addGap(20, 20, 20)
                        .addGroup(jPanel12Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                            .addComponent(jPanel24, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 723, Short.MAX_VALUE)
                            .addComponent(jScrollPane11, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.PREFERRED_SIZE, 687, javax.swing.GroupLayout.PREFERRED_SIZE))))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );
        jPanel12Layout.setVerticalGroup(
            jPanel12Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel12Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel12Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(cbbtpkhoa, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel150)
                    .addComponent(cbbtpkhoahoc, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel152)
                    .addComponent(cbbtpkyhoc, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel154))
                .addGap(18, 18, 18)
                .addGroup(jPanel12Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel149)
                    .addComponent(cbbtplop, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(cbbtpnhom, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel174)
                    .addComponent(cbbtpdanhsach, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel153))
                .addGap(11, 11, 11)
                .addGroup(jPanel12Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel151)
                    .addComponent(txttpSearch, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jScrollPane11, javax.swing.GroupLayout.PREFERRED_SIZE, 444, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(17, 17, 17)
                .addComponent(jPanel24, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(40, Short.MAX_VALUE))
        );

        jTabbedPane1.addTab("", new javax.swing.ImageIcon(getClass().getResource("/Images/QUAN LY TIEN PHAT.png")), jPanel12); // NOI18N

        jPanel13.setPreferredSize(new java.awt.Dimension(723, 675));

        jPanel26.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Tìm kiếm theo", javax.swing.border.TitledBorder.LEFT, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Tahoma", 1, 12))); // NOI18N

        TKB.setText("Thời khóa biểu");
        TKB.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                TKBActionPerformed(evt);
            }
        });
        jPanel26.add(TKB);

        DSNHOM.setText("Danh sách nhóm");
        DSNHOM.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                DSNHOMActionPerformed(evt);
            }
        });
        jPanel26.add(DSNHOM);

        DSLOP.setText("Danh sách lớp");
        DSLOP.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                DSLOPActionPerformed(evt);
            }
        });
        jPanel26.add(DSLOP);

        jRadioButton4.setText("Thông tin cá nhân");
        jPanel26.add(jRadioButton4);

        jLabel155.setText("Nhập từ khóa: ");

        search.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyPressed(java.awt.event.KeyEvent evt) {
                searchKeyPressed(evt);
            }
            public void keyReleased(java.awt.event.KeyEvent evt) {
                searchKeyReleased(evt);
            }
        });

        jButton30.setText("Search");

        TIMKIEM.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null}
            },
            new String [] {
                "Title 1", "Title 2", "Title 3", "Title 4"
            }
        ));
        jScrollPane12.setViewportView(TIMKIEM);

        javax.swing.GroupLayout jPanel25Layout = new javax.swing.GroupLayout(jPanel25);
        jPanel25.setLayout(jPanel25Layout);
        jPanel25Layout.setHorizontalGroup(
            jPanel25Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel25Layout.createSequentialGroup()
                .addGroup(jPanel25Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(jScrollPane12, javax.swing.GroupLayout.DEFAULT_SIZE, 713, Short.MAX_VALUE)
                    .addGroup(javax.swing.GroupLayout.Alignment.LEADING, jPanel25Layout.createSequentialGroup()
                        .addGap(58, 58, 58)
                        .addComponent(jLabel155)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(search, javax.swing.GroupLayout.PREFERRED_SIZE, 398, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(jButton30))
                    .addGroup(javax.swing.GroupLayout.Alignment.LEADING, jPanel25Layout.createSequentialGroup()
                        .addContainerGap()
                        .addComponent(jPanel26, javax.swing.GroupLayout.DEFAULT_SIZE, 703, Short.MAX_VALUE)))
                .addContainerGap())
        );
        jPanel25Layout.setVerticalGroup(
            jPanel25Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel25Layout.createSequentialGroup()
                .addComponent(jPanel26, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel25Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(jLabel155)
                    .addGroup(jPanel25Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                        .addComponent(search, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addComponent(jButton30)))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jScrollPane12, javax.swing.GroupLayout.DEFAULT_SIZE, 443, Short.MAX_VALUE)
                .addContainerGap())
        );

        jButton31.setText("In danh sách");
        jPanel27.add(jButton31);

        javax.swing.GroupLayout jPanel13Layout = new javax.swing.GroupLayout(jPanel13);
        jPanel13.setLayout(jPanel13Layout);
        jPanel13Layout.setHorizontalGroup(
            jPanel13Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel13Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel13Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jPanel25, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(jPanel27, javax.swing.GroupLayout.PREFERRED_SIZE, 711, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap())
        );
        jPanel13Layout.setVerticalGroup(
            jPanel13Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel13Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jPanel25, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(jPanel27, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(32, Short.MAX_VALUE))
        );

        jTabbedPane1.addTab("", new javax.swing.ImageIcon(getClass().getResource("/Images/TIM KIEM.png")), jPanel13); // NOI18N

        jMenu1.setText("Welcome: ");
        mbMenu.add(jMenu1);

        menuStaffName.setText("StaffName");
        mbMenu.add(menuStaffName);

        jMenu3.setBackground(new java.awt.Color(255, 51, 51));
        jMenu3.setText(" | ");
        mbMenu.add(jMenu3);

        jMenu4.setText("Thoát");
        mbMenu.add(jMenu4);

        menuStaffID.setText("GV001");
        mbMenu.add(menuStaffID);

        setJMenuBar(mbMenu);

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                .addComponent(jTabbedPane1, javax.swing.GroupLayout.Alignment.LEADING, 0, 0, Short.MAX_VALUE)
                .addComponent(jLabel1, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 948, Short.MAX_VALUE))
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addComponent(jLabel1)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jTabbedPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 645, Short.MAX_VALUE))
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents

    public String formatDate(Date d) {
        SimpleDateFormat formatter = new SimpleDateFormat("MM/dd/yyyy");
        java.util.Date date = new Date(d.getTime());
        return formatter.format(date);
    }

    public java.util.Date formatStringToDate(String d) {

        java.util.Date date = new java.util.Date(d);
        return date;
    }

    public void LoadJTable(JTable table, Vector data, Vector v) {

        model = new DefaultTableModel(data, v);
        table.setModel(model);

    }

    public void loadProfile() {
        String sql = "Select a.TenGiangVien,b.TenKhoa,a.NgaySinh, a.GioiTinh, a.DanToc, a.QuocTich,a.Email,a.DienThoai,a.CMND,a.DiaChi,a.HocVi,a.TrangThai "
                + "from GiangVien a,Khoa b where a.KhoaID=b.KhoaID and GiangVienID='" + menuStaffID.getText() + "'";
        try {
            call = con.prepareCall(sql);
            rs = call.executeQuery();

            rs.next();
            txtuhoten1.setText(rs.getString("TenGiangVien"));
            cbbukhoa.setEditable(false);
            cbbukhoa.setSelectedItem(rs.getString("TenKhoa"));
            cbbugioitinh1.setSelectedItem(rs.getString("GioiTinh"));
            txtudantoc.setText(rs.getString("DanToc"));
            txtuquoctich.setText(rs.getString("QuocTich"));
            txtudienthoai.setText(rs.getString("DienThoai"));
            txtuemail.setText(rs.getString("Email"));
            txtucmnd.setText(rs.getString("CMND"));
            txtuhocvi.setText(rs.getString("HocVi"));
            txtudiachi.setText(rs.getString("DiaChi"));
            dateungaysinh.setDate(rs.getDate("NgaySinh"));
            cbbuTrangThai.setSelectedItem(rs.getString("TrangThai"));

        } catch (Exception ex) {
            System.out.println("user" + ex.getMessage());
        }
    }

    public void SetData(String sql2) {
        try {
            Vector v = new Vector();
            Vector data = new Vector();
            call = con.prepareCall(sql2);
            rs = call.executeQuery();
            ResultSetMetaData rsm = rs.getMetaData();
            for (int i = 1; i <= rsm.getColumnCount(); i++) {
                v.add(rsm.getColumnName(i));

            }
            while (rs.next()) {
                Vector vt = new Vector();
                for (int i = 1; i <= rsm.getColumnCount(); i++) {
                    if (rsm.getColumnTypeName(i).equals("datetime")) {
                        vt.add(formatDate(rs.getDate(i)));
                    } else {
                        vt.add(rs.getString(i));
                    }

                }
                data.add(vt);
            }
            model = new DefaultTableModel(data, v);

            call.close();
            rs.close();
        } catch (Exception ex) {
            System.out.println("SetDATa" + ex.getMessage());
        }
    }

    public void SelectKhoa(JTable table, String sql2) {
        try {
            Vector v = new Vector();
            Vector data = new Vector();
            call = con.prepareCall(sql2);
            call.setString(1, cbbtpkhoa.getSelectedItem().toString());
            call.setString(2, cbbtpkhoahoc.getSelectedItem().toString());
            call.setString(3, cbbtpkyhoc.getSelectedItem().toString());
            call.setInt(4, cbbtpdanhsach.getSelectedIndex());
            rs = call.executeQuery();
            ResultSetMetaData rsm = rs.getMetaData();
            for (int i = 1; i <= rsm.getColumnCount(); i++) {
                v.add(rsm.getColumnName(i));

            }
            while (rs.next()) {
                Vector vt = new Vector();
                for (int i = 1; i <= rsm.getColumnCount(); i++) {
                    if (rsm.getColumnTypeName(i).equals("datetime")) {
                        vt.add(formatDate(rs.getDate(i)));
                    }
                    if (i == rsm.getColumnCount() && rsm.getColumnName(i).equals("TrangThai")) {
                        if (rs.getString(i).equals("Chưa nộp")) {
                            vt.add(Boolean.FALSE);
                        } else {
                            vt.add(Boolean.TRUE);
                        }
                    } else {
                        vt.add(rs.getString(i));
                    }

                }
                data.add(vt);
            }
            mymodel1 = new MyTableModel();
            mymodel1.insertcol(v);
            mymodel1.insertRow(data);
            table.setModel(mymodel1);
            call.close();
            rs.close();
        } catch (Exception ex) {
            System.out.println("SetDATa" + ex.getMessage());
        }
    }

    public void SelectKhoaSearch(String sql2) {
        try {
            Vector v = new Vector();
            Vector data = new Vector();
            call = con.prepareCall(sql2);
            call.setString(1, cbbtpkhoa.getSelectedItem().toString());
            call.setString(2, cbbtpkhoahoc.getSelectedItem().toString());
            call.setString(3, cbbtpkyhoc.getSelectedItem().toString());
            call.setInt(4, cbbtpdanhsach.getSelectedIndex());
            call.setString(5, txttpSearch.getText().trim());
            rs = call.executeQuery();
            ResultSetMetaData rsm = rs.getMetaData();
            for (int i = 1; i <= rsm.getColumnCount(); i++) {
                v.add(rsm.getColumnName(i));

            }
            while (rs.next()) {
                Vector vt = new Vector();
                for (int i = 1; i <= rsm.getColumnCount(); i++) {
                    if (rsm.getColumnTypeName(i).equals("datetime")) {
                        vt.add(formatDate(rs.getDate(i)));
                    }
                    if (i == rsm.getColumnCount() && rsm.getColumnName(i).equals("TrangThai")) {
                        if (rs.getString(i).equals("Chưa nộp")) {
                            vt.add(Boolean.FALSE);
                        } else {
                            vt.add(Boolean.TRUE);
                        }
                    } else {
                        vt.add(rs.getString(i));
                    }

                }
                data.add(vt);
            }
            mymodel1 = new MyTableModel();
            mymodel1.insertcol(v);
            mymodel1.insertRow(data);
            call.close();
            rs.close();
        } catch (Exception ex) {
            System.out.println("SetDATa" + ex.getMessage());
        }
    }

    public void SelectLop(JTable table, String sql2) {
        try {
            Vector v = new Vector();
            Vector data = new Vector();
            call = con.prepareCall(sql2);
            call.setString(1, cbbtpkhoa.getSelectedItem().toString());
            call.setString(2, cbbtpkhoahoc.getSelectedItem().toString());
            call.setString(3, cbbtpkyhoc.getSelectedItem().toString());
            call.setString(4, cbbtplop.getSelectedItem().toString());
            call.setInt(5, cbbtpdanhsach.getSelectedIndex());
            rs = call.executeQuery();
            ResultSetMetaData rsm = rs.getMetaData();
            for (int i = 1; i <= rsm.getColumnCount(); i++) {
                v.add(rsm.getColumnName(i));

            }
            while (rs.next()) {
                Vector vt = new Vector();
                for (int i = 1; i <= rsm.getColumnCount(); i++) {
                    if (rsm.getColumnTypeName(i).equals("datetime")) {
                        vt.add(formatDate(rs.getDate(i)));
                    }
                    if (rsm.getColumnTypeName(i).equals("datetime")) {
                        vt.add(formatDate(rs.getDate(i)));
                    }
                    if (i == rsm.getColumnCount() && rsm.getColumnName(i).equals("TrangThai")) {
                        if (rs.getString(i).equals("Chưa nộp")) {
                            vt.add(Boolean.FALSE);
                        } else {
                            vt.add(Boolean.TRUE);
                        }
                    } else {
                        vt.add(rs.getString(i));
                    }

                }
                data.add(vt);
            }
            mymodel1 = new MyTableModel();
            mymodel1.insertcol(v);
            mymodel1.insertRow(data);
            table.setModel(mymodel1);
            call.close();
            rs.close();
        } catch (Exception ex) {
            System.out.println("SetDATa" + ex.getMessage());
        }
    }

    public void SelectLopSearch(String sql2) {
        try {
            Vector v = new Vector();
            Vector data = new Vector();
            call = con.prepareCall(sql2);
            call.setString(1, cbbtpkhoa.getSelectedItem().toString());
            call.setString(2, cbbtpkhoahoc.getSelectedItem().toString());
            call.setString(3, cbbtpkyhoc.getSelectedItem().toString());
            call.setString(4, cbbtplop.getSelectedItem().toString());
            call.setInt(5, cbbtpdanhsach.getSelectedIndex());
            call.setString(6, txttpSearch.getText().trim());
            rs = call.executeQuery();
            ResultSetMetaData rsm = rs.getMetaData();
            for (int i = 1; i <= rsm.getColumnCount(); i++) {
                v.add(rsm.getColumnName(i));

            }
            while (rs.next()) {
                Vector vt = new Vector();
                for (int i = 1; i <= rsm.getColumnCount(); i++) {
                    if (rsm.getColumnTypeName(i).equals("datetime")) {
                        vt.add(formatDate(rs.getDate(i)));
                    }
                    if (rsm.getColumnTypeName(i).equals("datetime")) {
                        vt.add(formatDate(rs.getDate(i)));
                    }
                    if (i == rsm.getColumnCount() && rsm.getColumnName(i).equals("TrangThai")) {
                        if (rs.getString(i).equals("Chưa nộp")) {
                            vt.add(Boolean.FALSE);
                        } else {
                            vt.add(Boolean.TRUE);
                        }
                    } else {
                        vt.add(rs.getString(i));
                    }

                }
                data.add(vt);
            }
            mymodel1 = new MyTableModel();
            mymodel1.insertcol(v);
            mymodel1.insertRow(data);
            call.close();
            rs.close();
        } catch (Exception ex) {
            System.out.println("SetDATa" + ex.getMessage());
        }
    }

    public void SelectNhom(JTable table, String sql2) {
        try {
            Vector v = new Vector();
            Vector data = new Vector();
            call = con.prepareCall(sql2);
            call.setString(1, cbbtpkhoa.getSelectedItem().toString());
            call.setString(2, cbbtpkhoahoc.getSelectedItem().toString());
            call.setString(3, cbbtpkyhoc.getSelectedItem().toString());
            call.setString(4, cbbtpnhom.getSelectedItem().toString());
            call.setInt(5, cbbtpdanhsach.getSelectedIndex());
            rs = call.executeQuery();
            ResultSetMetaData rsm = rs.getMetaData();
            for (int i = 1; i <= rsm.getColumnCount(); i++) {
                v.add(rsm.getColumnName(i));

            }
            while (rs.next()) {
                Vector vt = new Vector();
                for (int i = 1; i <= rsm.getColumnCount(); i++) {
                    if (rsm.getColumnTypeName(i).equals("datetime")) {
                        vt.add(formatDate(rs.getDate(i)));
                    }
                    if (rsm.getColumnTypeName(i).equals("datetime")) {
                        vt.add(formatDate(rs.getDate(i)));
                    }
                    if (i == rsm.getColumnCount() && rsm.getColumnName(i).equals("TrangThai")) {
                        if (rs.getString(i).equals("Chưa nộp")) {
                            vt.add(Boolean.FALSE);
                        } else {
                            vt.add(Boolean.TRUE);
                        }
                    } else {
                        vt.add(rs.getString(i));
                    }

                }
                data.add(vt);
            }
            mymodel1 = new MyTableModel();
            mymodel1.insertcol(v);
            mymodel1.insertRow(data);
            table.setModel(mymodel1);
            call.close();
            rs.close();
        } catch (Exception ex) {
            System.out.println("SetDATa" + ex.getMessage());
        }
    }

    public void SelectNhomSearch(String sql2) {
        try {
            Vector v = new Vector();
            Vector data = new Vector();
            call = con.prepareCall(sql2);
            call.setString(1, cbbtpkhoa.getSelectedItem().toString());
            call.setString(2, cbbtpkhoahoc.getSelectedItem().toString());
            call.setString(3, cbbtpkyhoc.getSelectedItem().toString());
            call.setString(4, cbbtpnhom.getSelectedItem().toString());
            call.setInt(5, cbbtpdanhsach.getSelectedIndex());
            call.setString(6, txttpSearch.getText().trim());
            rs = call.executeQuery();
            ResultSetMetaData rsm = rs.getMetaData();
            for (int i = 1; i <= rsm.getColumnCount(); i++) {
                v.add(rsm.getColumnName(i));

            }
            while (rs.next()) {
                Vector vt = new Vector();
                for (int i = 1; i <= rsm.getColumnCount(); i++) {
                    if (rsm.getColumnTypeName(i).equals("datetime")) {
                        vt.add(formatDate(rs.getDate(i)));
                    }
                    if (rsm.getColumnTypeName(i).equals("datetime")) {
                        vt.add(formatDate(rs.getDate(i)));
                    }
                    if (i == rsm.getColumnCount() && rsm.getColumnName(i).equals("TrangThai")) {
                        if (rs.getString(i).equals("Chưa nộp")) {
                            vt.add(Boolean.FALSE);
                        } else {
                            vt.add(Boolean.TRUE);
                        }
                    } else {
                        vt.add(rs.getString(i));
                    }

                }
                data.add(vt);
            }
            mymodel1 = new MyTableModel();
            mymodel1.insertcol(v);
            mymodel1.insertRow(data);
            call.close();
            rs.close();
        } catch (Exception ex) {
            System.out.println("SetDATa" + ex.getMessage());
        }
    }

    public void SetDataTKB(String sql2) {
        try {
            Vector v = new Vector();
            Vector data = new Vector();
            call = con.prepareCall(sql2);
            rs = call.executeQuery();
            ResultSetMetaData rsm = rs.getMetaData();
            boolean kt = true;
            for (int i = 1; i <= rsm.getColumnCount(); i++) {
                if (rsm.getColumnTypeName(i).equals("bit")) {
                    if (kt) {
                        v.add("Thu");
                        kt = false;
                    }

                } else {
                    v.add(rsm.getColumnName(i));

                }
            }
            while (rs.next()) {
                Vector vt = new Vector();
                for (int i = 1; i <= rsm.getColumnCount(); i++) {
                    if (rsm.getColumnTypeName(i).equals("bit")) {
                        if (rs.getString(i).equals("1")) {
                            vt.add(rsm.getColumnName(i).substring(rsm.getColumnName(i).length() - 1));
                        }
                    } else {
                        if (rsm.getColumnTypeName(i).equals("datetime")) {
                            vt.add(formatDate(rs.getDate(i)));
                        } else {
                            vt.add(rs.getString(i));
                        }
                    }


                }
                data.add(vt);
            }
            model = new DefaultTableModel(data, v);
            call.close();
            rs.close();
        } catch (Exception ex) {
            System.out.println("SetDATa" + ex.getMessage());
        }
    }

    public void SetDataCheckBox1(JTable table, String sql) {

        try {
            call = con.prepareCall(sql);
            rs = call.executeQuery();
            ResultSetMetaData rsm = rs.getMetaData();

            Vector col = new Vector();
            Vector data = new Vector();
            for (int i = 1; i <= rsm.getColumnCount(); i++) {
                col.add(rsm.getColumnName(i));
            }
            col.add("Chon");
            boolean check = false;
            while (rs.next()) {
                Vector vt = new Vector();
                for (int i = 1; i <= rsm.getColumnCount(); i++) {
                    vt.add(rs.getString(i));
                }
                vt.add(check);
                data.add(vt);
            }
            mymodel1 = new MyTableModel();
            mymodel1.insertcol(col);
            mymodel1.insertRow(data);
            table.setModel(mymodel1);
        } catch (Exception ex) {
            System.out.println(ex.getMessage());
        }
    }

    public void SetDataCheckBox2(JTable table, String sql) {

        try {
            call = con.prepareCall(sql);
            rs = call.executeQuery();
            ResultSetMetaData rsm = rs.getMetaData();

            Vector col = new Vector();
            Vector data = new Vector();
            for (int i = 1; i <= rsm.getColumnCount(); i++) {
                col.add(rsm.getColumnName(i));
            }
            col.add("Chon");
            boolean check = false;
            while (rs.next()) {
                Vector vt = new Vector();
                for (int i = 1; i <= rsm.getColumnCount(); i++) {
                    vt.add(rs.getString(i));
                }
                vt.add(check);
                data.add(vt);
            }
            mymodel2 = new MyTableModel();
            mymodel2.insertcol(col);
            mymodel2.insertRow(data);
            table.setModel(mymodel2);
        } catch (Exception ex) {
            System.out.println(ex.getMessage());
        }
    }

    public void SetDataCheckBoxDiemDanh(JTable table, String sql) {

        try {
            call = con.prepareCall(sql);
            rs = call.executeQuery();
            ResultSetMetaData rsm = rs.getMetaData();

            Vector col = new Vector();
            Vector data = new Vector();
            for (int i = 1; i <= rsm.getColumnCount(); i++) {
                col.add(rsm.getColumnName(i));
            }
            while (rs.next()) {
                Vector vt = new Vector();
                for (int i = 1; i <= rsm.getColumnCount(); i++) {
                    if (i == rsm.getColumnCount()) {
                        if (rs.getString(i).equals("1")) {
                            vt.add(Boolean.TRUE);
                        } else {
                            vt.add(Boolean.FALSE);
                        }
                    } else {
                        vt.add(rs.getString(i));
                    }
                }
                data.add(vt);
            }
            mymodel1 = new MyTableModel();
            mymodel1.insertcol(col);
            mymodel1.insertRow(data);
            table.setModel(mymodel1);
        } catch (Exception ex) {
            System.out.println(ex.getMessage());
        }
    }

    public void SetDataCombobox(String sql2) {
        try {
            Vector v = new Vector();
            call = con.prepareCall(sql2);
            rs = call.executeQuery();
            while (rs.next()) {
                v.add(rs.getString(1));
            }
            cbbmodel = new DefaultComboBoxModel(v);
            call.close();
            rs.close();
        } catch (Exception ex) {
            System.out.println(ex.getMessage());
        }
    }

    public void SetDataComboboxLop(String sql2) {
        try {
            Vector v = new Vector();
            call = con.prepareCall(sql2);
            rs = call.executeQuery();
            v.add("Chọn lớp");
            while (rs.next()) {
                v.add(rs.getString(1));
            }
            cbbmodel = new DefaultComboBoxModel(v);
            call.close();
            rs.close();
        } catch (Exception ex) {
            System.out.println(ex.getMessage());
        }
    }

    public void SetDataComboboxNhom(String sql2) {
        try {
            Vector v = new Vector();
            call = con.prepareCall(sql2);
            rs = call.executeQuery();
            v.add("Chọn nhóm");
            while (rs.next()) {
                v.add(rs.getString(1));
            }
            cbbmodel = new DefaultComboBoxModel(v);
            call.close();
            rs.close();
        } catch (Exception ex) {
            System.out.println(ex.getMessage());
        }
    }

    public void loadNgay() {
        try {
            String sql = "Select a.TKBID,a.Thu2,a.Thu3,a.Thu4,a.Thu5,a.Thu6,a.Thu7,a.TongSoBuoi,d.NgayBatDau,d.NgayKetThuc "
                    + "from ThoiKhoaBieu a,MonHoc b,Nhom c,Ky d,KhoaHoc e,Khoa f "
                    + "where a.MonID=b.MonHocID and a.NhomID=c.NhomID and c.KyID = d.KyID "
                    + "and d.KhoaHocID = e.KhoaHocID and e.KhoaID = f.KhoaID "
                    + "and b.TenMon=N'" + cbbddmonhoc.getSelectedItem().toString() + "' "
                    + "and c.TenNhom=N'" + cbbddnhom.getSelectedItem().toString() + "' "
                    + "and d.TenKy=N'" + cbbddkyhoc.getSelectedItem().toString() + "' "
                    + "and e.TenKhoaHoc=N'" + cbbddkhoahoc.getSelectedItem().toString() + "' "
                    + "and f.TenKhoa=N'" + cbbddkhoa.getSelectedItem() + "'";
            call = con.prepareCall(sql);
            rs = call.executeQuery();
            rs.next();
            ResultSetMetaData rsm = rs.getMetaData();
            Date start, finish;
            int thu = 1;
            for (int i = 1; i <= rsm.getColumnCount(); i++) {
                if (rsm.getColumnTypeName(i).equals("bit")) {
                    if (rs.getString(i).equals("1")) {
                        thu = Integer.parseInt(rsm.getColumnName(i).substring(rsm.getColumnName(i).length() - 1));
                    }
                }
            }
            start = rs.getDate(rsm.getColumnCount() - 1);
            finish = rs.getDate(rsm.getColumnCount());

            int tong = 0;
            tong = rs.getInt(rsm.getColumnCount() - 2);
            call = con.prepareCall("{call SelectDate(?,?,?,?)}");
            call.setInt(1, thu);
            call.setDate(2, start);
            call.setDate(3, finish);
            call.setInt(4, tong);
            call.execute();

            call = con.prepareCall("Select * from tam");
            rs = call.executeQuery();
            if (rs != null) {
                Vector v = new Vector();
                while (rs.next()) {
                    v.add(formatDate(rs.getDate(1)));
                }
                cbbmodel = new DefaultComboBoxModel(v);
            } else {
                System.out.println("null");
            }
        } catch (Exception ex) {
            System.out.println("error: " + ex.getMessage());
        }
    }

    private void btnKThemmoiTActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnKThemmoiTActionPerformed
        // TODO add your handling code here:
boolean kt=true;
        if (txtKTenKhoaT.getText().equals(""))
        {
            JOptionPane.showMessageDialog(new JButton("OK"),"Lỗi: khung tên khoa còn trống");
            kt=false;
        }
        if (kt)
        try {
            call = con.prepareCall("{call ThemKhoa(?,?)}");
            call.setString(1, txtKTenKhoaT.getText());
            call.setString(2, cbbKTrangThaiT.getSelectedItem().toString());
            call.execute();
            JOptionPane.showMessageDialog(rootPane, "Thêm khoa thành công");
            SetData("Select * From Khoa Order by(KhoaID) DESC");
            tableKhoa.setModel(model);

        } catch (Exception ex) {
            JOptionPane.showMessageDialog(rootPane, "Thêm khoa không thành công \n" + ex.getMessage());
        }


    }//GEN-LAST:event_btnKThemmoiTActionPerformed

    private void btnKDeleteActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnKDeleteActionPerformed
        // TODO add your handling code here:
        if (tableKhoa.getSelectedRow() == -1) {
            JOptionPane.showMessageDialog(rootPane, "Vui lòng chọn khoa muốn xóat");
        } else {
            int confirm = JOptionPane.showConfirmDialog(rootPane, "Bạn có chắc chắn muốn xóa khoa này?");
            if (confirm == JOptionPane.OK_OPTION) {
                try {
                    pre = con.prepareCall("Delete from Khoa where KhoaID='" + tableKhoa.getValueAt(tableKhoa.getSelectedRow(), 0).toString() + "'");
                    pre.executeUpdate();
                    SetData("Select * From Khoa Order by(KhoaID) DESC");
                    tableKhoa.setModel(model);
                    JOptionPane.showMessageDialog(rootPane, "Xóa thành công");
                } catch (SQLException ex) {
                    JOptionPane.showMessageDialog(rootPane, "Xóa không thành công");
                }
            }
        }
    }//GEN-LAST:event_btnKDeleteActionPerformed

    private void btnCreate1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnCreate1ActionPerformed
        // TODO add your handling code here:
        qlkCreate.setVisible(true);
        qlkEdit.setVisible(false);
    }//GEN-LAST:event_btnCreate1ActionPerformed

    private void btnDelete7ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnDelete7ActionPerformed
        // TODO add your handling code here:
        if (tableKy.getSelectedRow() == -1) {
            JOptionPane.showMessageDialog(rootPane, "Vui lòng chọn kỳ muốn xóa");
        } else {
            int confirm = JOptionPane.showConfirmDialog(rootPane, "Bạn có chắc chắn muốn xóa kỳ này?");
            if (confirm == JOptionPane.OK_OPTION) {
                try {
                    pre = con.prepareCall("Delete from Ky where KyID='" + tableKy.getValueAt(tableKy.getSelectedRow(), 0).toString() + "'");
                    pre.executeUpdate();
                    SetData("Select a.KyID,a.TenKy,b.TenKhoaHoc,a.NgayBatDau,a.NgayKetThuc,c.TenKhoa"
                            + " from Ky a, Khoahoc b,Khoa c"
                            + " where a.KhoaHocID = b.KhoaHocID and b.KhoaID = c.KhoaID");
                    tableKy.setModel(model);
                    JOptionPane.showMessageDialog(rootPane, "Xóa thành công");
                } catch (SQLException ex) {
                    JOptionPane.showMessageDialog(rootPane, "Xóa không thành công");
                }
            }
        }
    }//GEN-LAST:event_btnDelete7ActionPerformed

    private void btnCreate5ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnCreate5ActionPerformed
        // TODO add your handling code here:
        qlkyCreate.setVisible(true);
        qlkyEdit.setVisible(false);
    }//GEN-LAST:event_btnCreate5ActionPerformed

    public Date getDate(long time) {
        return new Date(time);
    }
    private void btnCreate6ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnCreate6ActionPerformed
        // TODO add your handling code here:
boolean kt=true;
        if (txtKYTenKy1.getText().equals(""))
        {
            JOptionPane.showMessageDialog(new JButton("OK"),"Lỗi: khung tên kỳ còn trống");
            kt=false;
        }
        if (kt)
        try {
            call = con.prepareCall("{call ThemKy(?,?,?,?,?)}");
            call.setString(1, txtKYTenKy1.getText());
            call.setString(2, cbbKYKhoa1.getSelectedItem().toString());
            call.setString(3, cbbKYKhoaHoc1.getSelectedItem().toString());
            call.setDate(4, getDate(dateKyNBD1.getDate().getTime()));
            call.setDate(5, getDate(dateKYNKT1.getDate().getTime()));
            call.execute();
            JOptionPane.showMessageDialog(rootPane, "Thêm kỳ học thành công");
            SetData("Select a.KyID,a.TenKy,b.TenKhoaHoc,a.NgayBatDau,a.NgayKetThuc,c.TenKhoa"
                    + " from Ky a, Khoahoc b,Khoa c"
                    + " where a.KhoaHocID = b.KhoaHocID and b.KhoaID = c.KhoaID order by(a.KyID) DESC");
            tableKy.setModel(model);
        } catch (Exception ex) {
            JOptionPane.showMessageDialog(rootPane, "Thêm khóa học không thành công" + ex.getMessage());
        }


    }//GEN-LAST:event_btnCreate6ActionPerformed

    private void btnkyCapnhatActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnkyCapnhatActionPerformed
        // TODO add your handling code here:
        boolean kt=true;
        if (txtkytenky2.getText().equals(""))
        {
            JOptionPane.showMessageDialog(new JButton("OK"),"Lỗi: khung tên kỳ còn trống");
            kt=false;
        }
        if (kt)
        try {
            call = con.prepareCall("{call SuaKy(?,?,?,?,?,?)}");
            call.setString(1, txtkykyid.getText());
            call.setString(2, txtkytenky2.getText());
            call.setString(3, cbbKYKhoa3.getSelectedItem().toString());
            call.setString(4, cbbKyKhoaHoc2.getSelectedItem().toString());
            call.setDate(5, getDate(datenbd2.getDate().getTime()));
            call.setDate(6, getDate(datekynkt2.getDate().getTime()));
            call.execute();
            JOptionPane.showMessageDialog(rootPane, "Cập nhật kỳ thành công");
            SetData("Select a.KyID,a.TenKy,b.TenKhoaHoc,a.NgayBatDau,a.NgayKetThuc,c.TenKhoa"
                    + " from Ky a, Khoahoc b,Khoa c"
                    + " where a.KhoaHocID = b.KhoaHocID and b.KhoaID=c.KhoaID");
            tableKy.setModel(model);
        } catch (Exception ex) {
            JOptionPane.showMessageDialog(rootPane, "Cập nhật kỳ không thành công");
        }
    }//GEN-LAST:event_btnkyCapnhatActionPerformed

    private void btnDelete9ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnDelete9ActionPerformed
        // TODO add your handling code here:
        if (tableLop.getSelectedRow() == -1) {
            JOptionPane.showMessageDialog(rootPane, "Vui lòng chọn lớp muốn xóat");
        } else {
            int confirm = JOptionPane.showConfirmDialog(rootPane, "Bạn có chắc chắn muốn xóa lớp này?");
            if (confirm == JOptionPane.OK_OPTION) {
                try {
                    pre = con.prepareCall("Delete from Lop where LopID='" + tableLop.getValueAt(tableLop.getSelectedRow(), 0).toString() + "'");
                    pre.executeUpdate();
                    SetData("Select a.LopID, a.TenLop,b.TenKhoaHoc,c.TenKhoa from Lop a,KhoaHoc b,Khoa c"
                            + " where a.KhoaHocID=b.KhoaHocID and b.KhoaID = c.KhoaID");
                    tableLop.setModel(model);
                    JOptionPane.showMessageDialog(rootPane, "Xóa thành công");
                } catch (SQLException ex) {
                    JOptionPane.showMessageDialog(rootPane, "Xóa không thành công");
                }
            }
        }
    }//GEN-LAST:event_btnDelete9ActionPerformed

    private void btnCreate7ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnCreate7ActionPerformed
        // TODO add your handling code here:
        qllopCreate.setVisible(true);
        qllopEdit.setVisible(false);

    }//GEN-LAST:event_btnCreate7ActionPerformed

    private void btnCreate8ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnCreate8ActionPerformed
        // TODO add your handling code here:
boolean kt=true;
        if (txtloptenlop1.getText().equals(""))
        {
            JOptionPane.showMessageDialog(new JButton("OK"),"Lỗi: khung tên lớp còn trống");
            kt=false;
        }
        if (kt)
        try {
            call = con.prepareCall("{call ThemLop(?,?,?)}");
            call.setString(1, txtloptenlop1.getText());
            call.setString(2, cbblopKhoa1.getSelectedItem().toString());
            call.setString(3, cbblopKhoaHoc1.getSelectedItem().toString());
            call.execute();
            JOptionPane.showMessageDialog(rootPane, "Thêm lớp học thành công");
            SetData("Select a.LopID, a.TenLop,b.TenKhoaHoc,c.TenKhoa from Lop a,KhoaHoc b,Khoa c"
                    + " where a.KhoaHocID=b.KhoaHocID and b.KhoaID = c.KhoaID order by(a.LopID) DESC");
            tableLop.setModel(model);
        } catch (Exception ex) {
            JOptionPane.showMessageDialog(rootPane, "Thêm lớp học không thành công");
        }
    }//GEN-LAST:event_btnCreate8ActionPerformed

    private void btnlopcapnhatActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnlopcapnhatActionPerformed
        // TODO add your handling code here:
        boolean kt=true;
        if (txtloptenlop2.getText().equals(""))
        {
            JOptionPane.showMessageDialog(new JButton("OK"),"Lỗi: khung tên khoa còn trống");
            kt=false;
        }
        if (kt)
        try {
            call = con.prepareCall("{call SuaLop(?,?,?,?)}");
            call.setString(1, txtloplopid.getText());
            call.setString(2, txtloptenlop2.getText());
            call.setString(3, cbblopkhoa2.getSelectedItem().toString());
            call.setString(4, cbblopkhoahoc2.getSelectedItem().toString());
            call.execute();
            JOptionPane.showMessageDialog(rootPane, "Cập nhật lớp học thành công");
            SetData("Select a.LopID, a.TenLop,b.TenKhoaHoc,c.TenKhoa from Lop a,KhoaHoc b,Khoa c"
                    + " where a.KhoaHocID=b.KhoaHocID and b.KhoaID = c.KhoaID");
            tableLop.setModel(model);
        } catch (Exception ex) {
            JOptionPane.showMessageDialog(rootPane, "Cập nhật lớp học không thành công");
        }
    }//GEN-LAST:event_btnlopcapnhatActionPerformed

    private void btnnhomxoaActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnnhomxoaActionPerformed
        // TODO add your handling code here:
        if (tableNhom.getSelectedRow() == -1) {
            JOptionPane.showMessageDialog(rootPane, "Vui lòng chọn nhóm muốn xóa");
        } else {
            int confirm = JOptionPane.showConfirmDialog(rootPane, "Bạn có chắc chắn muốn xóa nhóm này?");
            if (confirm == JOptionPane.OK_OPTION) {
                try {
                    call = con.prepareCall("{call XoaNhom(?)}");
                    call.setString(1, tableNhom.getValueAt(tableNhom.getSelectedRow(), 0).toString());
                    call.execute();
                    SetData("Select a.NhomID,a.TenNhom,b.TenKy,c.TenKhoaHoc,d.TenKhoa,a.TrangThai "
                            + "from Nhom a, Ky b, KhoaHoc c,Khoa d "
                            + "where a.KyID=b.KyID and b.KhoaHocID = c.KhoaHocID and c.KhoaID = d.KhoaID order by(a.NhomID) DESC");
                    tableNhom.setModel(model);
                    JOptionPane.showMessageDialog(rootPane, "Xóa thành công");
                } catch (SQLException ex) {
                    JOptionPane.showMessageDialog(rootPane, "Xóa không thành công" + ex.getMessage());
                }
            }
        }
    }//GEN-LAST:event_btnnhomxoaActionPerformed

    private void btnCreate9ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnCreate9ActionPerformed
        // TODO add your handling code here:
        qlnhomCreate.setVisible(true);
        qlnhomEdit.setVisible(false);
    }//GEN-LAST:event_btnCreate9ActionPerformed

    private void btnnhomthemActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnnhomthemActionPerformed
        // TODO add your handling code here:
boolean kt=true;
        if (txtnhomtennhom1.getText().equals(""))
        {
            JOptionPane.showMessageDialog(new JButton("OK"),"Lỗi: khung tên nhóm còn trống");
            kt=false;
        }
        if (kt)
        try {
            call = con.prepareCall("{call ThemNhom(?,?,?,?,?)}");
            call.setString(1, txtnhomtennhom1.getText());
            call.setString(2, cbbnhomkhoa1.getSelectedItem().toString());
            call.setString(3, cbbnhomkhoahoc1.getSelectedItem().toString());
            call.setString(4, cbbnhomky1.getSelectedItem().toString());
            call.setString(5, cbbnhomtt1.getSelectedItem().toString());
            call.execute();
            JOptionPane.showMessageDialog(rootPane, "Thêm nhóm thành công");
            SetData("Select a.NhomID,a.TenNhom,b.TenKy,c.TenKhoaHoc,d.TenKhoa,a.TrangThai  "
                    + "from Nhom a, Ky b, KhoaHoc c,Khoa d "
                    + "where a.KyID=b.KyID and b.KhoaHocID = c.KhoaHocID and c.KhoaID = d.KhoaID order by(a.NhomID) DESC");
            tableNhom.setModel(model);
        } catch (Exception ex) {
            JOptionPane.showMessageDialog(rootPane, "Thêm nhóm không thành công");
        }
    }//GEN-LAST:event_btnnhomthemActionPerformed

    private void btnnhomcapnhatActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnnhomcapnhatActionPerformed
        // TODO add your handling code here:
boolean kt=true;
        if (txtnhomtennhom2.getText().equals(""))
        {
            JOptionPane.showMessageDialog(new JButton("OK"),"Lỗi: khung tên nhóm còn trống");
            kt=false;
        }
        if (kt)
        try {
            call = con.prepareCall("{call SuaNhom(?,?,?,?,?,?)}");
            call.setString(1, txtnhomnhomid.getText());
            call.setString(2, txtnhomtennhom2.getText());
            call.setString(3, cbbnhomkhoa2.getSelectedItem().toString());
            call.setString(4, cbbnhomkhoahoc2.getSelectedItem().toString());
            call.setString(5, cbbnhomky2.getSelectedItem().toString());
            call.setString(6, cbbnhomtt2.getSelectedItem().toString());

            call.execute();
            JOptionPane.showMessageDialog(rootPane, "Cập nhật nhóm thành công");
            SetData("Select a.NhomID,a.TenNhom,b.TenKy,c.TenKhoaHoc,d.TenKhoa,a.TrangThai  "
                    + "from Nhom a, Ky b, KhoaHoc c,Khoa d "
                    + "where a.KyID=b.KyID and b.KhoaHocID = c.KhoaHocID and c.KhoaID = d.KhoaID order by(a.NhomID) DESC");
            tableMon.setModel(model);
        } catch (Exception ex) {
            JOptionPane.showMessageDialog(rootPane, "Cập nhật nhóm không thành công");
        }
    }//GEN-LAST:event_btnnhomcapnhatActionPerformed

    private void btnDelete13ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnDelete13ActionPerformed
        // TODO add your handling code here:
        if (tableMon.getSelectedRow() == -1) {
            JOptionPane.showMessageDialog(rootPane, "Vui lòng chọn môn học muốn xóa");
        } else {
            int confirm = JOptionPane.showConfirmDialog(rootPane, "Bạn có chắc chắn muốn xóa môn học này?");
            if (confirm == JOptionPane.OK_OPTION) {
                try {
                    pre = con.prepareCall("Delete from MonHoc where MonHocID='" + tableMon.getValueAt(tableMon.getSelectedRow(), 0).toString() + "'");
                    pre.executeUpdate();
                    SetData("Select a.MonHocID,a.TenMon, a.TongSoTiet, b.TenKhoa, a.TrangThai from MonHoc a, Khoa b "
                            + "where a.KhoaID=b.KhoaID order by(a.MonHocID)");
                    tableMon.setModel(model);
                    JOptionPane.showMessageDialog(rootPane, "Xóa thành công");
                } catch (SQLException ex) {
                    JOptionPane.showMessageDialog(rootPane, "Xóa không thành công");
                }
            }
        }
    }//GEN-LAST:event_btnDelete13ActionPerformed

    private void btnCreate11ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnCreate11ActionPerformed
        // TODO add your handling code here:
        qlmonCreate.setVisible(true);
        qlmonEdit.setVisible(false);
    }//GEN-LAST:event_btnCreate11ActionPerformed

    private void btnmhthemActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnmhthemActionPerformed
        // TODO add your handling code here:
boolean kt=true;
        if (txtmhtenmon1.getText().equals(""))
        {
            JOptionPane.showMessageDialog(new JButton("OK"),"Lỗi: khung tên môn học còn trống");
            kt=false;
        }

        if (txtmhtong1.getText().equals(""))
        {
             JOptionPane.showMessageDialog(new JButton("OK"),"Lỗi: khung tổng số tiết học còn trống");
            kt=false;
        }
        else if (!(CheckNumber(txtmhtong1.getText())))
        {
             JOptionPane.showMessageDialog(new JButton("OK"),"Lỗi: Nhập sai số buổi");
            kt=false;
        }
        if (kt)

        try {
            call = con.prepareCall("{call ThemMon(?,?,?,?)}");
            call.setString(1, txtmhtenmon1.getText());
            call.setString(2, cbbmhkhoa1.getSelectedItem().toString());
            call.setString(3, txtmhtong1.getText());
            call.setString(4, cbbmhtt1.getSelectedItem().toString());
            call.execute();
            JOptionPane.showMessageDialog(rootPane, "Thêm môn học thành công");
            SetData("Select a.MonHocID,a.TenMon, a.TongSoTiet, b.TenKhoa, a.TrangThai from MonHoc a, Khoa b "
                    + "where a.KhoaID=b.KhoaID order by(a.MonHocID)");
            tableMon.setModel(model);
        } catch (Exception ex) {
            JOptionPane.showMessageDialog(rootPane, "Thêm môn học không thành công");
        }
    }//GEN-LAST:event_btnmhthemActionPerformed

    private void btnmhCapnhatActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnmhCapnhatActionPerformed
        // TODO add your handling code here:
boolean kt=true;
        if (txtmhtenmon2.getText().equals(""))
        {
            JOptionPane.showMessageDialog(new JButton("OK"),"Lỗi: khung tên môn học còn trống");
            kt=false;
        }

        if (txtmhtong2.getText().equals(""))
        {
             JOptionPane.showMessageDialog(new JButton("OK"),"Lỗi: khung tổng số tiết học còn trống");
            kt=false;
        }
        else if (!(CheckNumber(txtmhtong2.getText())))
        {
             JOptionPane.showMessageDialog(new JButton("OK"),"Lỗi: Nhập sai số buổi");
            kt=false;
        }
        if (kt)
        try {
            call = con.prepareCall("{call SuaMon(?,?,?,?,?)}");
            call.setString(1, txtmhmonhocid.getText());
            call.setString(2, txtmhtenmon2.getText());
            call.setString(3, cbbmhKhoa2.getSelectedItem().toString());
            call.setString(4, txtmhtong2.getText());
            call.setString(5, cbbmhtt2.getSelectedItem().toString());
            call.execute();
            JOptionPane.showMessageDialog(rootPane, "Cập nhật môn học thành công");
            SetData("Select a.MonHocID,a.TenMon, a.TongSoTiet, b.TenKhoa, a.TrangThai from MonHoc a, Khoa b "
                    + "where a.KhoaID=b.KhoaID order by(a.MonHocID)");
            tableMon.setModel(model);
        } catch (Exception ex) {
            JOptionPane.showMessageDialog(rootPane, "Cập nhật môn học không thành công");
        }
    }//GEN-LAST:event_btnmhCapnhatActionPerformed

    private void txtmhtong2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_txtmhtong2ActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_txtmhtong2ActionPerformed

    private void btnsvdeleteActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnsvdeleteActionPerformed
        // TODO add your handling code here:
        if (tableSinhvien.getSelectedRow() == -1) {
            JOptionPane.showMessageDialog(rootPane, "Vui lòng chọn sinh viên muốn xóa");
        } else {
            int confirm = JOptionPane.showConfirmDialog(rootPane, "Bạn có chắc chắn muốn xóa sinh viên này?");
            if (confirm == JOptionPane.OK_OPTION) {
                try {
                    pre = con.prepareCall("Delete from SinhVien where SinhVienID='" + tableSinhvien.getValueAt(tableSinhvien.getSelectedRow(), 0).toString() + "'");
                    pre.executeUpdate();
                    SetData("Select a.SinhVienID,a.TenSinhVien,b.TenLop,a.GioiTinh,a.NgaySinh,a.Email,a.DienThoai "
                            + "from SinhVien a,Lop b "
                            + "where a.LopID=b.LopID ");
                    tableSinhvien.setModel(model);
                    JOptionPane.showMessageDialog(rootPane, "Xóa thành công");
                } catch (SQLException ex) {
                    JOptionPane.showMessageDialog(rootPane, "Xóa không thành công");
                }
            }
        }
    }//GEN-LAST:event_btnsvdeleteActionPerformed

    private void btnCreate13ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnCreate13ActionPerformed
        // TODO add your handling code here:
        qlsvCreate.setVisible(true);
        qlsvEdit.setVisible(false);
    }//GEN-LAST:event_btnCreate13ActionPerformed

public boolean CheckNumber(String s)
    {
        try
        {
        int i=Integer.parseInt(s);
        return true;
        }catch(Exception e)
        {
            return false;
        }
    }
    private void btnsvthemActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnsvthemActionPerformed
        // TODO add your handling code here:
boolean kt=true;
        if (txtsvhoten1.getText().equals(""))
        {
            JOptionPane.showMessageDialog(new JButton("OK"),"Lỗi: khung họ tên còn trống");
            kt=false;
        }
        if (txtsvdantoc1.getText().equals(""))
        {
             JOptionPane.showMessageDialog(new JButton("OK"),"Lỗi: khung dân tộc còn trống");
            kt=false;
        }
        if (txtsvquoctich1.getText().equals(""))
        {
             JOptionPane.showMessageDialog(new JButton("OK"),"Lỗi: khung quốc tịch còn trống");
            kt=false;
        }
        if (txtsvemail1.getText().equals(""))
        {
             JOptionPane.showMessageDialog(new JButton("OK"),"Lỗi: khung email trống");
            kt=false;
        }
        else if (!((txtsvemail1.getText().endsWith("@yahoo.com"))||(txtsvemail1.getText().endsWith("@gmail.com"))))
        //||!(txtsvemail1.getText().endsWith("@gmail.com")))
        {
             JOptionPane.showMessageDialog(new JButton("OK"),"Nhập email sai");
            kt=false;
        }
        if (txtsvdienthoai1.getText().equals(""))
        {
             JOptionPane.showMessageDialog(new JButton("OK"),"Lỗi: khung điện thoại còn trống");
            kt=false;
        }
        else if (!(CheckNumber(txtsvdienthoai1.getText())))
        {
             JOptionPane.showMessageDialog(new JButton("OK"),"Lỗi: Nhập sai số điện thoại");
            kt=false;
        }
        if (txtsvcmnd1.getText().equals(""))
        {
             JOptionPane.showMessageDialog(new JButton("OK"),"Lỗi: khung CMND còn trống");
            kt=false;
        }
        else if (!(CheckNumber(txtsvcmnd1.getText())))
        {
             JOptionPane.showMessageDialog(new JButton("OK"),"Lỗi: Nhập sai số CMND");
            kt=false;
        }
        if (txtsvdiachi1.getText().equals(""))
        {
             JOptionPane.showMessageDialog(new JButton("OK"),"Lỗi: khung địa chỉ còn trống");
            kt=false;
        }

        if (kt)
        try {
            call = con.prepareCall("{call ThemSV(?,?,?,?,?,?,?,?,?,?,?,?,?)}");
            call.setString(1, txtsvhoten1.getText());
            call.setString(2, cbbsvkhoa1.getSelectedItem().toString());
            call.setString(3, cbbsvkhoahoc1.getSelectedItem().toString());
            call.setString(4, cbbsvlop1.getSelectedItem().toString());
            call.setString(5, cbbsvgiotinh1.getSelectedItem().toString());
            call.setDate(6, getDate(datesvngaysinh1.getDate().getTime()));
            call.setString(7, txtsvdantoc1.getText());
            call.setString(8, txtsvquoctich1.getText());
            call.setString(9, txtsvemail1.getText());
            call.setString(10, txtsvdienthoai1.getText());
            call.setString(11, txtsvcmnd1.getText());
            call.setString(12, txtsvdiachi1.getText());
            call.setString(13, cbbsvtt1.getSelectedItem().toString());


            call.execute();
            JOptionPane.showMessageDialog(rootPane, "Thêm sinh viên thành công");
            SetData("Select a.SinhVienID,a.TenSinhVien,b.TenLop,a.GioiTinh,a.NgaySinh,a.Email,a.DienThoai "
                    + "from SinhVien a,Lop b "
                    + "where a.LopID=b.LopID  "
                    + "order by(a.SinhVienID) DESC");
            tableSinhvien.setModel(model);
        } catch (Exception ex) {
            JOptionPane.showMessageDialog(rootPane, "Thêm sinh viên không thành công");
        }
    }//GEN-LAST:event_btnsvthemActionPerformed

    private void btnsvcapnhatActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnsvcapnhatActionPerformed
        // TODO add your handling code here:
boolean kt=true;
        if (txtsvhoten2.getText().equals(""))
        {
            JOptionPane.showMessageDialog(new JButton("OK"),"Lỗi: khung họ tên còn trống");
            kt=false;
        }
        if (txtsvdantoc2.getText().equals(""))
        {
             JOptionPane.showMessageDialog(new JButton("OK"),"Lỗi: khung dân tộc còn trống");
            kt=false;
        }
        if (txtsvquoctich2.getText().equals(""))
        {
             JOptionPane.showMessageDialog(new JButton("OK"),"Lỗi: khung quốc tịch còn trống");
            kt=false;
        }
        if (txtsvemail2.getText().equals(""))
        {
             JOptionPane.showMessageDialog(new JButton("OK"),"Lỗi: khung email trống");
            kt=false;
        }
        else if (!((txtsvemail2.getText().endsWith("@yahoo.com"))||(txtsvemail2.getText().endsWith("@gmail.com"))))
        {
             JOptionPane.showMessageDialog(new JButton("OK"),"Nhập email sai");
            kt=false;
        }
        if (txtsvdienthoai2.getText().equals(""))
        {
             JOptionPane.showMessageDialog(new JButton("OK"),"Lỗi: khung điện thoại còn trống");
            kt=false;
        }
        else if (!(CheckNumber(txtsvdienthoai2.getText())))
        {
             JOptionPane.showMessageDialog(new JButton("OK"),"Lỗi: Nhập sai số điện thoại");
            kt=false;
        }
        if (txtsvcmnd2.getText().equals(""))
        {
             JOptionPane.showMessageDialog(new JButton("OK"),"Lỗi: khung CMND còn trống");
            kt=false;
        }
        else if (!(CheckNumber(txtsvcmnd2.getText())))
        {
             JOptionPane.showMessageDialog(new JButton("OK"),"Lỗi: Nhập sai số CMND");
            kt=false;
        }
        if (txtsvdiachi2.getText().equals(""))
        {
             JOptionPane.showMessageDialog(new JButton("OK"),"Lỗi: khung địa chỉ còn trống");
            kt=false;
        }

        if (kt)
       
        try {
            call = con.prepareCall("{call SuaSV(?,?,?,?,?,?,?,?,?,?,?,?,?,?)}");
            call.setString(1, txtsvsinhvienid.getText());
            call.setString(2, txtsvhoten2.getText());
            call.setString(3, cbbsvkhoa2.getSelectedItem().toString());
            call.setString(4, cbbsvkhoahoc2.getSelectedItem().toString());
            call.setString(5, cbbsvlop2.getSelectedItem().toString());
            call.setString(6, cbbsvgioitinh2.getSelectedItem().toString());
            call.setDate(7, getDate(datesvngaysinh2.getDate().getTime()));
            call.setString(8, txtsvdantoc2.getText());
            call.setString(9, txtsvquoctich2.getText());
            call.setString(10, txtsvemail2.getText());
            call.setString(11, txtsvdienthoai2.getText());
            call.setString(12, txtsvcmnd2.getText());
            call.setString(13, txtsvdiachi2.getText());
            call.setString(14, cbbsvtt2.getSelectedItem().toString());


            call.execute();
            JOptionPane.showMessageDialog(rootPane, "Cập nhật sinh viên thành công");
            SetData("Select a.SinhVienID,a.TenSinhVien,b.TenLop,a.GioiTinh,a.NgaySinh,a.Email,a.DienThoai "
                    + "from SinhVien a,Lop b "
                    + "where a.LopID=b.LopID  "
                    + "order by(a.SinhVienID) DESC");
            tableSinhvien.setModel(model);
        } catch (Exception ex) {
            JOptionPane.showMessageDialog(rootPane, "Cập nhật sinh viên không thành công");
            System.out.println(ex.getMessage());
        }
    }//GEN-LAST:event_btnsvcapnhatActionPerformed

    private void txtsvemail1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_txtsvemail1ActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_txtsvemail1ActionPerformed

    private void txtsvemail2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_txtsvemail2ActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_txtsvemail2ActionPerformed

    private void btngvdeleteActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btngvdeleteActionPerformed
        // TODO add your handling code here:
        if (tableGiangVien.getSelectedRow() == -1) {
            JOptionPane.showMessageDialog(rootPane, "Vui lòng chọn giảng viên muốn xóa");
        } else {
            int confirm = JOptionPane.showConfirmDialog(rootPane, "Bạn có chắc chắn muốn xóa giảng viên này?");
            if (confirm == JOptionPane.OK_OPTION) {
                try {
                    pre = con.prepareCall("Delete from GiangVien where GiangVienID='" + tableGiangVien.getValueAt(tableGiangVien.getSelectedRow(), 0).toString() + "'");
                    pre.executeUpdate();
                    SetData("select a.GiangVienID,a.TenGiangVien,b.TenKhoa,a.NgaySinh,a.GioiTinh,a.Email,a.DienThoai "
                            + "from GiangVien a,Khoa b "
                            + "where a.KhoaID = b.KhoaID");
                    tableGiangVien.setModel(model);
                    JOptionPane.showMessageDialog(rootPane, "Xóa thành công");
                } catch (SQLException ex) {
                    JOptionPane.showMessageDialog(rootPane, "Xóa không thành công");
                }
            }
        }
    }//GEN-LAST:event_btngvdeleteActionPerformed

    private void btnCreate15ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnCreate15ActionPerformed
        // TODO add your handling code here:
        qlgvCreate.setVisible(true);
        qlgvEdit.setVisible(false);
    }//GEN-LAST:event_btnCreate15ActionPerformed

    private void btngvThemActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btngvThemActionPerformed
        // TODO add your handling code here:
boolean kt=true;
        if (txtgvhoten1.getText().equals(""))
        {
            JOptionPane.showMessageDialog(new JButton("OK"),"Lỗi: khung họ tên còn trống");
            kt=false;
        }
        if (txtgvdantoc1.getText().equals(""))
        {
             JOptionPane.showMessageDialog(new JButton("OK"),"Lỗi: khung dân tộc còn trống");
            kt=false;
        }
        if (txtgvquoctich1.getText().equals(""))
        {
             JOptionPane.showMessageDialog(new JButton("OK"),"Lỗi: khung quốc tịch còn trống");
            kt=false;
        }
        if (txtgvemail1.getText().equals(""))
        {
             JOptionPane.showMessageDialog(new JButton("OK"),"Lỗi: khung email trống");
            kt=false;
        }
        else if (!((txtgvemail1.getText().endsWith("@yahoo.com"))||(txtgvemail1.getText().endsWith("@gmail.com"))))
        {
             JOptionPane.showMessageDialog(new JButton("OK"),"Nhập email sai");
            kt=false;
        }
        if (txtgvdienthoai1.getText().equals(""))
        {
             JOptionPane.showMessageDialog(new JButton("OK"),"Lỗi: khung điện thoại còn trống");
            kt=false;
        }
        else if (!(CheckNumber(txtgvdienthoai1.getText())))
        {
             JOptionPane.showMessageDialog(new JButton("OK"),"Lỗi: Nhập sai số điện thoại");
            kt=false;
        }
        if (txtgvcmnd1.getText().equals(""))
        {
             JOptionPane.showMessageDialog(new JButton("OK"),"Lỗi: khung CMND còn trống");
            kt=false;
        }
        else if (!(CheckNumber(txtgvcmnd1.getText())))
        {
             JOptionPane.showMessageDialog(new JButton("OK"),"Lỗi: Nhập sai số CMND");
            kt=false;
        }
        if (txtgvdiachi1.getText().equals(""))
        {
             JOptionPane.showMessageDialog(new JButton("OK"),"Lỗi: khung địa chỉ còn trống");
            kt=false;
        }
         if (txtgvhocvi1.getText().equals(""))
        {
             JOptionPane.showMessageDialog(new JButton("OK"),"Lỗi: khung học vị còn trống");
            kt=false;
        }
        if (kt)

        try {
            call = con.prepareCall("{call ThemGV(?,?,?,?,?,?,?,?,?,?,?,?)}");
            call.setString(1, txtgvhoten1.getText());
            call.setString(2, cbbgvkhoa1.getSelectedItem().toString());
            call.setDate(3, getDate(dategvngaysinh1.getDate().getTime()));
            call.setString(4, cbbgvgioitinh1.getSelectedItem().toString());
            call.setString(5, txtgvdantoc1.getText());
            call.setString(6, txtgvquoctich1.getText());
            call.setString(7, txtgvemail1.getText());
            call.setString(8, txtgvdienthoai1.getText());
            call.setString(9, txtgvcmnd1.getText());
            call.setString(10, txtgvdiachi1.getText());
            call.setString(11, txtgvhocvi1.getText());
            call.setString(12, cbbgvtt1.getSelectedItem().toString());
            call.execute();
            JOptionPane.showMessageDialog(rootPane, "Thêm giảng viên thành công");
            SetData("select a.GiangVienID,a.TenGiangVien,b.TenKhoa,a.NgaySinh,a.GioiTinh,a.Email,a.DienThoai "
                    + "from GiangVien a,Khoa b "
                    + "where a.KhoaID = b.KhoaID "
                    + "order by(a.GiangVienID) DESC");
            tableGiangVien.setModel(model);
        } catch (Exception ex) {
            JOptionPane.showMessageDialog(rootPane, "Thêm giảng viên không thành công");
            System.out.println(ex.getMessage());
        }
    }//GEN-LAST:event_btngvThemActionPerformed

    private void txtgvemail1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_txtgvemail1ActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_txtgvemail1ActionPerformed

    private void btngvCapnhatActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btngvCapnhatActionPerformed
        // TODO add your handling code here:
boolean kt=true;
        if (txtgvhoten2.getText().equals(""))
        {
            JOptionPane.showMessageDialog(new JButton("OK"),"Lỗi: khung họ tên còn trống");
            kt=false;
        }
        if (txtgvdantoc2.getText().equals(""))
        {
             JOptionPane.showMessageDialog(new JButton("OK"),"Lỗi: khung dân tộc còn trống");
            kt=false;
        }
        if (txtgvquoctich2.getText().equals(""))
        {
             JOptionPane.showMessageDialog(new JButton("OK"),"Lỗi: khung quốc tịch còn trống");
            kt=false;
        }
        if (txtgvemail2.getText().equals(""))
        {
             JOptionPane.showMessageDialog(new JButton("OK"),"Lỗi: khung email trống");
            kt=false;
        }
        else if (!((txtgvemail2.getText().endsWith("@yahoo.com"))||(txtgvemail2.getText().endsWith("@gmail.com"))))
        {
             JOptionPane.showMessageDialog(new JButton("OK"),"Nhập email sai");
            kt=false;
        }
        if (txtgvdienthoai2.getText().equals(""))
        {
             JOptionPane.showMessageDialog(new JButton("OK"),"Lỗi: khung điện thoại còn trống");
            kt=false;
        }
        else if (!(CheckNumber(txtgvdienthoai2.getText())))
        {
             JOptionPane.showMessageDialog(new JButton("OK"),"Lỗi: Nhập sai số điện thoại");
            kt=false;
        }
        if (txtgvcmnd2.getText().equals(""))
        {
             JOptionPane.showMessageDialog(new JButton("OK"),"Lỗi: khung CMND còn trống");
            kt=false;
        }
        else if (!(CheckNumber(txtgvcmnd2.getText())))
        {
             JOptionPane.showMessageDialog(new JButton("OK"),"Lỗi: Nhập sai số CMND");
            kt=false;
        }
        if (txtgvdiachi2.getText().equals(""))
        {
             JOptionPane.showMessageDialog(new JButton("OK"),"Lỗi: khung địa chỉ còn trống");
            kt=false;
        }
         if (txtgvhocvi2.getText().equals(""))
        {
             JOptionPane.showMessageDialog(new JButton("OK"),"Lỗi: khung học vị còn trống");
            kt=false;
        }
        if (kt)

        try {
            call = con.prepareCall("{call SuaGV(?,?,?,?,?,?,?,?,?,?,?,?,?)}");
            call.setString(1, txtgvgvid.getText());
            call.setString(2, txtgvhoten2.getText());
            call.setString(3, cbbgvkhoa2.getSelectedItem().toString());
            call.setDate(4, getDate(dategvNgaysinh2.getDate().getTime()));
            call.setString(5, cbbgvgioitinh2.getSelectedItem().toString());
            call.setString(6, txtgvdantoc2.getText());
            call.setString(6, txtgvquoctich2.getText());
            call.setString(6, txtgvemail2.getText());
            call.setString(6, txtgvdienthoai2.getText());
            call.setString(6, txtgvcmnd2.getText());
            call.setString(6, txtgvdiachi2.getText());
            call.setString(6, txtgvhocvi2.getText());
            call.setString(6, cbbgvtt2.getSelectedItem().toString());
            call.execute();
            JOptionPane.showMessageDialog(rootPane, "Cập nhật giảng viên thành công");
            SetData("select a.GiangVienID,a.TenGiangVien,b.TenKhoa,a.NgaySinh,a.GioiTinh,a.Email,a.DienThoai "
                    + "from GiangVien a,Khoa b "
                    + "where a.KhoaID = b.KhoaID");
            tableGiangVien.setModel(model);
        } catch (Exception ex) {
            JOptionPane.showMessageDialog(rootPane, "Cập nhật giảng viên không thành công");
        }
    }//GEN-LAST:event_btngvCapnhatActionPerformed

    private void txtgvemail2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_txtgvemail2ActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_txtgvemail2ActionPerformed

    private void btnThemmoiActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnThemmoiActionPerformed
        // TODO add your handling code here:
        qltkbCreate.setVisible(true);
        qltkbEdit.setVisible(false);
    }//GEN-LAST:event_btnThemmoiActionPerformed

    private void btntkbDeleteActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btntkbDeleteActionPerformed
        // TODO add your handling code here:
        if (tableThoiKhoaBieu.getSelectedRow() == -1) {
            JOptionPane.showMessageDialog(rootPane, "Vui lòng chọn dòng muốn xóa");
        } else {
            int confirm = JOptionPane.showConfirmDialog(rootPane, "Bạn có chắc chắn muốn xóa dòng này");
            if (confirm == JOptionPane.OK_OPTION) {
                try {
                    call = con.prepareCall("{call XoaTKB(?)}");
                    call.setString(1, tableThoiKhoaBieu.getValueAt(tableThoiKhoaBieu.getSelectedRow(), 0).toString());
                    call.execute();
                    SetDataTKB("Select a.TKBID,b.TenMon,c.TenGiangVien,a.Thu2,a.Thu3,a.Thu4,a.Thu5,a.Thu6,a.Thu7, "
                            + "a.TietBatDau,a.TietKetThuc,a.TongSoBuoi,a.Phong,a.TrangThai "
                            + "from ThoiKhoaBieu a,MonHoc b,GiangVien c "
                            + "where a.MonID=b.MonHocID and a.GiangVienID = c.GiangVienID "
                            + "and a.NhomID in(select a.NhomID "
                            + "from Nhom a,Ky b,KhoaHoc c,Khoa d "
                            + "where a.KyID = b.KyID  and b.KhoaHocID = c.KhoaHocID and c.KhoaID = d.KhoaID "
                            + "and d.TenKhoa=N'" + cbbtkbkhoa.getSelectedItem().toString() + "' "
                            + "and c.TenKhoaHoc=N'" + cbbtkbkhoahoc.getSelectedItem().toString() + "' "
                            + "and b.TenKy = N'" + cbbtkbky.getSelectedItem().toString() + "' "
                            + "and a.TenNhom=N'" + cbbtkbnhom.getSelectedItem().toString() + "') "
                            + "order by(a.TKBID) DESC");
                    tableThoiKhoaBieu.setModel(model);
                    JOptionPane.showMessageDialog(rootPane, "Xóa thành công");
                } catch (SQLException ex) {
                    JOptionPane.showMessageDialog(rootPane, "Xóa không thành công");
                }
            }
        }
    }//GEN-LAST:event_btntkbDeleteActionPerformed

    private void cbbtkbtkt2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_cbbtkbtkt2ActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_cbbtkbtkt2ActionPerformed

    private void btntkbCapNhatActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btntkbCapNhatActionPerformed
        // TODO add your handling code here:
        boolean[] thu = new boolean[6];
        for (int i = 0; i < thu.length; i++) {
            if ((i + 2) == Integer.parseInt(cbbtkbthu2.getSelectedItem().toString().substring(cbbtkbthu2.getSelectedItem().toString().length() - 1))) {
                thu[i] = true;
            } else {
                thu[i] = false;
            }
        }
        try {
            call = con.prepareCall("{call SuaTKB(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)}");
            call.setString(1, txttkbtkbid.getText());
            call.setString(2, cbbtkbkhoa.getSelectedItem().toString());
            call.setString(3, cbbtkbmon2.getSelectedItem().toString());
            call.setBoolean(4, thu[0]);
            call.setBoolean(5, thu[1]);
            call.setBoolean(6, thu[2]);
            call.setBoolean(7, thu[3]);
            call.setBoolean(8, thu[4]);
            call.setBoolean(9, thu[5]);
            call.setString(10, cbbtkbgiangvien2.getSelectedItem().toString());
            call.setInt(11, Integer.parseInt(cbbtkbtbd2.getSelectedItem().toString()));

            call.setInt(12, Integer.parseInt(cbbtkbtkt2.getSelectedItem().toString()));
            call.setInt(13, Integer.parseInt(txttkbtong2.getText()));
            call.setString(14, txttkbphong2.getText());
            call.setString(15, cbbtkbtt2.getSelectedItem().toString());
            call.execute();
            JOptionPane.showMessageDialog(rootPane, "Cập nhật thời khóa biểu thành công");
            SetDataTKB("Select a.TKBID,b.TenMon,c.TenGiangVien,a.Thu2,a.Thu3,a.Thu4,a.Thu5,a.Thu6,a.Thu7, "
                    + "a.TietBatDau,a.TietKetThuc,a.TongSoBuoi,a.Phong,a.TrangThai "
                    + "from ThoiKhoaBieu a,MonHoc b,GiangVien c "
                    + "where a.MonID=b.MonHocID and a.GiangVienID = c.GiangVienID "
                    + "and a.NhomID in(select a.NhomID "
                    + "from Nhom a,Ky b,KhoaHoc c,Khoa d "
                    + "where a.KyID = b.KyID  and b.KhoaHocID = c.KhoaHocID and c.KhoaID = d.KhoaID "
                    + "and d.TenKhoa=N'" + cbbtkbkhoa.getSelectedItem().toString() + "' "
                    + "and c.TenKhoaHoc=N'" + cbbtkbkhoahoc.getSelectedItem().toString() + "' "
                    + "and b.TenKy = N'" + cbbtkbky.getSelectedItem().toString() + "' "
                    + "and a.TenNhom=N'" + cbbtkbnhom.getSelectedItem().toString() + "')");
            tableThoiKhoaBieu.setModel(model);
        } catch (Exception ex) {
            JOptionPane.showMessageDialog(rootPane, "Cập nhật thời khóa biểu không thành công");
            System.out.println(ex.getMessage());
        }
    }//GEN-LAST:event_btntkbCapNhatActionPerformed

    private void btnddds1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnddds1ActionPerformed
        // TODO add your handling code here:
}//GEN-LAST:event_btnddds1ActionPerformed

    private void btnCreate20ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnCreate20ActionPerformed
        // TODO add your handling code here:
}//GEN-LAST:event_btnCreate20ActionPerformed

    private void btnCreate21ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnCreate21ActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_btnCreate21ActionPerformed

    private void btnKCapNhatActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnKCapNhatActionPerformed
        // TODO add your handling code here:
        boolean kt=true;
        if (txtKTenKhoa2.getText().equals(""))
        {
            JOptionPane.showMessageDialog(new JButton("OK"),"Lỗi: khung tên khoa còn trống");
            kt=false;
        }
        if (kt)
        try {

            call = con.prepareCall("{call SuaKhoa(?,?,?)}");
            call.setString(1, txtKKhoaID2.getText());
            call.setString(2, txtKTenKhoa2.getText());
            call.setString(3, cbbKTrangThai2.getSelectedItem().toString());
            call.execute();
            SetData("Select * From Khoa Order by(KhoaID) DESC");
            tableKhoa.setModel(model);
            JOptionPane.showMessageDialog(rootPane, "Cập nhật thành công");
        } catch (Exception ex) {
            JOptionPane.showMessageDialog(rootPane, "Cập nhật không thành công" + ex.getMessage());
        }
    }//GEN-LAST:event_btnKCapNhatActionPerformed

    private void btnKResetTActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnKResetTActionPerformed
        // TODO add your handling code here:
        txtKTenKhoaT.setText("");
        cbbKTrangThaiT.setSelectedIndex(0);

    }//GEN-LAST:event_btnKResetTActionPerformed

    private void pnQuanLiKhoaComponentShown(java.awt.event.ComponentEvent evt) {//GEN-FIRST:event_pnQuanLiKhoaComponentShown
        // TODO add your handling code here:
        SetData("Select * From Khoa Order by(KhoaID) DESC");
        tableKhoa.setModel(model);
    }//GEN-LAST:event_pnQuanLiKhoaComponentShown

    private void tableKhoaMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_tableKhoaMouseClicked
        // TODO add your handling code here:
        qlkEdit.setVisible(true);
        qlkCreate.setVisible(false);
        txtKKhoaID2.setEditable(false);
        ;
        txtKKhoaID2.setText(tableKhoa.getValueAt(tableKhoa.getSelectedRow(), 0).toString());
        txtKTenKhoa2.setText(tableKhoa.getValueAt(tableKhoa.getSelectedRow(), 1).toString());
        cbbKTrangThai2.setSelectedItem(tableKhoa.getValueAt(tableKhoa.getSelectedRow(), 2).toString());
    }//GEN-LAST:event_tableKhoaMouseClicked

    public boolean checkIfNumber(String in) {

        try {

            Integer.parseInt(in);

        } catch (NumberFormatException ex) {
            return false;
        }

        return true;
    }
    private void txtdasdasdas1KeyPressed(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_txtdasdasdas1KeyPressed
        // TODO add your handling code here:
        try {
            String key = txtdasdasdas1.getText().trim();
            String sql = "";
            if (checkIfNumber(key.substring(2, key.length())) && key.substring(0, 2).equals("KA")) {
                sql = "Select * from Khoa where KhoaID='" + key + "'";
            } else {
                sql = "Select * from Khoa where TenKhoa like N'%" + key + "%'";
            }

            SetData(sql);
            tableKhoa.setModel(model);
        } catch (Exception ex) {
        }
    }//GEN-LAST:event_txtdasdasdas1KeyPressed

    private void txtdasdasdas1KeyReleased(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_txtdasdasdas1KeyReleased
        // TODO add your handling code here:
        String key = txtdasdasdas1.getText().trim();
        String sql = "";
        if (key.equals("")) {
            sql = "Select * from Khoa";
            SetData(sql);
            tableKhoa.setModel(model);
        }

    }//GEN-LAST:event_txtdasdasdas1KeyReleased

    private void jPanel2ComponentShown(java.awt.event.ComponentEvent evt) {//GEN-FIRST:event_jPanel2ComponentShown
        // TODO add your handling code here:
        SetData("Select a.KhoaHocID,a.TenKhoaHoc,b.TenKhoa from KhoaHoc a, Khoa b where a.KhoaID=b.KhoaID order by(a.KhoaHocID) DESC");
        tableKhoaHoc.setModel(model);
        SetDataCombobox("Select TenKhoa from Khoa");
        cbbKHKhoa.setModel(cbbmodel);
        cbbKHKhoa2.setModel(cbbmodel);
    }//GEN-LAST:event_jPanel2ComponentShown

    private void jPanel15ComponentShown(java.awt.event.ComponentEvent evt) {//GEN-FIRST:event_jPanel15ComponentShown
        // TODO add your handling code here:
}//GEN-LAST:event_jPanel15ComponentShown

    private void btnKHCapNhatActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnKHCapNhatActionPerformed
        // TODO add your handling code here:
        boolean kt=true;
        if (txtKHTenKhoaHoc2.getText().equals(""))
        {
            JOptionPane.showMessageDialog(new JButton("OK"),"Lỗi: khung tên khoa còn trống");
            kt=false;
        }
        if (kt)
        try {
            call = con.prepareCall("{call SuaKhoaHoc(?,?,?)}");
            call.setString(1, txtKHKhoaHocID.getText());
            call.setString(2, txtKHTenKhoaHoc2.getText());
            call.setString(3, cbbKHKhoa2.getSelectedItem().toString());
            call.execute();
            JOptionPane.showMessageDialog(rootPane, "Cập nhật khóa học thành công");
            SetData("Select a.KhoaHocID,a.TenKhoaHoc,b.TenKhoa from KhoaHoc a, Khoa b "
                    + "where a.KhoaID=b.KhoaID order by(a.KhoaHocID) DESC");
            tableKhoaHoc.setModel(model);
        } catch (Exception ex) {
            JOptionPane.showMessageDialog(rootPane, "Cập nhật khóa học không thành công");
        }
}//GEN-LAST:event_btnKHCapNhatActionPerformed

    private void btnCreate4ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnCreate4ActionPerformed
        // TODO add your handling code here:
boolean kt=true;
        if (txtKHTenKhoaHoc.getText().equals(""))
        {
            JOptionPane.showMessageDialog(new JButton("OK"),"Lỗi: khung tên khóa học còn trống");
            kt=false;
        }
        if (kt)
        try {
            call = con.prepareCall("{call ThemKhoaHoc(?,?)}");
            call.setString(1, txtKHTenKhoaHoc.getText());
            call.setString(2, cbbKHKhoa.getSelectedItem().toString());
            call.execute();
            JOptionPane.showMessageDialog(rootPane, "Thêm khóa học thành công");
            SetData("Select a.KhoaHocID,a.TenKhoaHoc,b.TenKhoa from KhoaHoc a, Khoa b "
                    + "where a.KhoaID=b.KhoaID order by(a.KhoaHocID) DESC");
            tableKhoaHoc.setModel(model);
        } catch (Exception ex) {
            JOptionPane.showMessageDialog(rootPane, "Thêm khóa học không thành công");
        }
    }//GEN-LAST:event_btnCreate4ActionPerformed

    private void btnCreate3ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnCreate3ActionPerformed
        // TODO add your handling code here:
        qlkhCreate.setVisible(true);
        qlkhEdit.setVisible(false);
}//GEN-LAST:event_btnCreate3ActionPerformed

    private void btnKHDeleteActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnKHDeleteActionPerformed
        // TODO add your handling code here:
        if (tableKhoaHoc.getSelectedRow() == -1) {
            JOptionPane.showMessageDialog(rootPane, "Vui lòng chọn khóa học muốn xóat");
        } else {
            int confirm = JOptionPane.showConfirmDialog(rootPane, "Bạn có chắc chắn muốn xóa khóa học này?");
            if (confirm == JOptionPane.OK_OPTION) {
                try {
                    pre = con.prepareCall("Delete from KhoaHoc where KhoaHocID='"
                            + tableKhoaHoc.getValueAt(tableKhoaHoc.getSelectedRow(), 0).toString() + "'");
                    pre.executeUpdate();
                    SetData("Select a.KhoaHocID,a.TenKhoaHoc,b.TenKhoa from KhoaHoc a, Khoa b where a.KhoaID=b.KhoaID");
                    tableKhoaHoc.setModel(model);
                    JOptionPane.showMessageDialog(rootPane, "Xóa thành công");
                } catch (SQLException ex) {
                    JOptionPane.showMessageDialog(rootPane, "Xóa không thành công");
                }
            }
        }

}//GEN-LAST:event_btnKHDeleteActionPerformed

    private void tableKhoaHocMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_tableKhoaHocMouseClicked
        // TODO add your handling code here:
        qlkhEdit.setVisible(true);
        qlkhCreate.setVisible(false);
        txtKHKhoaHocID.setEditable(false);
        txtKHKhoaHocID.setText(tableKhoaHoc.getValueAt(tableKhoaHoc.getSelectedRow(), 0).toString());
        txtKHTenKhoaHoc2.setText(tableKhoaHoc.getValueAt(tableKhoaHoc.getSelectedRow(), 1).toString());
        cbbKHKhoa2.setSelectedItem(tableKhoaHoc.getValueAt(tableKhoaHoc.getSelectedRow(), 2).toString());
    }//GEN-LAST:event_tableKhoaHocMouseClicked

    private void txtSearchKhoaHocKeyPressed(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_txtSearchKhoaHocKeyPressed
        // TODO add your handling code here:
        try {
            String key = txtSearchKhoaHoc.getText().trim();
            String sql = "";
            if (checkIfNumber(key.substring(2, key.length())) && key.substring(0, 2).equals("KH")) {
                sql = "Select a.KhoaHocID,a.TenKhoaHoc,b.TenKhoa from KhoaHoc a, Khoa b "
                        + "where a.KhoaID=b.KhoaID and a.KhoaHocID='" + key + "'";
            } else {
                sql = "Select a.KhoaHocID,a.TenKhoaHoc,b.TenKhoa from KhoaHoc a, Khoa b "
                        + "where a.KhoaID=b.KhoaID and (a.TenKhoaHoc like N'%" + key + "%' or b.TenKhoa like N'%" + key + "%')";
            }

            SetData(sql);
            tableKhoaHoc.setModel(model);
        } catch (Exception ex) {
        }
    }//GEN-LAST:event_txtSearchKhoaHocKeyPressed

    private void txtSearchKhoaHocKeyReleased(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_txtSearchKhoaHocKeyReleased
        // TODO add your handling code here:
        String key = txtSearchKhoaHoc.getText().trim();
        String sql = "";
        if (key.equals("")) {
            sql = "Select a.KhoaHocID,a.TenKhoaHoc,b.TenKhoa from KhoaHoc a, Khoa b where a.KhoaID=b.KhoaID";
            SetData(sql);
            tableKhoaHoc.setModel(model);
        }

    }//GEN-LAST:event_txtSearchKhoaHocKeyReleased

    private void jPanel16ComponentShown(java.awt.event.ComponentEvent evt) {//GEN-FIRST:event_jPanel16ComponentShown
        // TODO add your handling code here:
    }//GEN-LAST:event_jPanel16ComponentShown

    private void jPanel3ComponentShown(java.awt.event.ComponentEvent evt) {//GEN-FIRST:event_jPanel3ComponentShown
        // TODO add your handling code here:
        SetData("Select a.KyID,a.TenKy,b.TenKhoaHoc,a.NgayBatDau,a.NgayKetThuc,c.TenKhoa"
                + " from Ky a, Khoahoc b,Khoa c"
                + " where a.KhoaHocID = b.KhoaHocID and b.KhoaID = c.KhoaID order by(a.KyID)");
        tableKy.setModel(model);
        SetDataCombobox("Select TenKhoa from Khoa");
        cbbKYKhoa1.setModel(cbbmodel);
        cbbKYKhoa3.setModel(cbbmodel);
        SetDataCombobox("Select Distinct(a.TenKhoaHoc) "
                + "from KhoaHoc a,Khoa b "
                + "where a.KhoaID = b.KhoaID and b.TenKhoa = N'" + cbbKYKhoa1.getSelectedItem().toString() + "'");
        cbbKYKhoaHoc1.setModel(cbbmodel);
        cbbKyKhoaHoc2.setModel(cbbmodel);
    }//GEN-LAST:event_jPanel3ComponentShown

    private void cbbKYKhoa1ItemStateChanged(java.awt.event.ItemEvent evt) {//GEN-FIRST:event_cbbKYKhoa1ItemStateChanged
        // TODO add your handling code here:
        SetDataCombobox("Select Distinct(a.TenKhoaHoc) "
                + "from KhoaHoc a,Khoa b "
                + "where a.KhoaID = b.KhoaID and b.TenKhoa = N'" + cbbKYKhoa1.getSelectedItem().toString() + "'");
        cbbKYKhoaHoc1.setModel(cbbmodel);
    }//GEN-LAST:event_cbbKYKhoa1ItemStateChanged

    private void bntResetActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_bntResetActionPerformed
        // TODO add your handling code here:
        txtKYTenKy1.setText("");
        dateKYNKT1.cleanup();
        dateKyNBD1.cleanup();

    }//GEN-LAST:event_bntResetActionPerformed

    private void txtSearchKyKeyPressed(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_txtSearchKyKeyPressed
        // TODO add your handling code here:
        try {
            String key = txtSearchKy.getText().trim();
            String sql = "";
            if (checkIfNumber(key.substring(1, key.length())) && key.substring(0, 1).equals("K")) {
                sql = "Select a.KyID,a.TenKy,b.TenKhoaHoc,a.NgayBatDau,a.NgayKetThuc,c.TenKhoa"
                        + " from Ky a, Khoahoc b,Khoa c"
                        + " where a.KhoaHocID = b.KhoaHocID and b.KhoaID = c.KhoaID and a.KyID='" + key + "'";
            } else {
                sql = "Select a.KyID,a.TenKy,b.TenKhoaHoc,a.NgayBatDau,a.NgayKetThuc,c.TenKhoa"
                        + " from Ky a, Khoahoc b,Khoa c"
                        + " where a.KhoaHocID = b.KhoaHocID and b.KhoaID = c.KhoaID "
                        + " and (a.TenKy like N'%" + key + "%' or b.TenKhoaHoc like N'%" + key + "%' or c.TenKhoa like N'%" + key + "%')";
            }

            SetData(sql);
            tableKy.setModel(model);
        } catch (Exception ex) {
        }
    }//GEN-LAST:event_txtSearchKyKeyPressed

    private void txtSearchKyKeyReleased(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_txtSearchKyKeyReleased
        // TODO add your handling code here:
        String key = txtSearchKy.getText().trim();
        String sql = "";
        if (key.equals("")) {
            sql = "Select a.KyID,a.TenKy,b.TenKhoaHoc,a.NgayBatDau,a.NgayKetThuc,c.TenKhoa"
                    + " from Ky a, Khoahoc b,Khoa c"
                    + " where a.KhoaHocID = b.KhoaHocID and b.KhoaID = c.KhoaID ";
            SetData(sql);
            tableKy.setModel(model);
        }
    }//GEN-LAST:event_txtSearchKyKeyReleased

    private void tableKyMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_tableKyMouseClicked
        // TODO add your handling code here:
        qlkyEdit.setVisible(true);
        qlkyCreate.setVisible(false);
        txtkykyid.setEditable(false);
        txtkykyid.setText(tableKy.getValueAt(tableKy.getSelectedRow(), 0).toString());
        txtkytenky2.setText(tableKy.getValueAt(tableKy.getSelectedRow(), 1).toString());
        cbbKyKhoaHoc2.setSelectedItem(tableKy.getValueAt(tableKy.getSelectedRow(), 2).toString());
        datenbd2.setDateFormatString("dd/MM/yyyy");
        datenbd2.setDate(formatStringToDate(tableKy.getValueAt(tableKy.getSelectedRow(), 3).toString()));
        datekynkt2.setDateFormatString("dd/MM/yyyy");
        datekynkt2.setDate(formatStringToDate(tableKy.getValueAt(tableKy.getSelectedRow(), 4).toString()));
        cbbKYKhoa3.setSelectedItem(tableKy.getValueAt(tableKy.getSelectedRow(), 5).toString());
    }//GEN-LAST:event_tableKyMouseClicked

    private void cbbKYKhoa3ItemStateChanged(java.awt.event.ItemEvent evt) {//GEN-FIRST:event_cbbKYKhoa3ItemStateChanged
        // TODO add your handling code here:
        SetDataCombobox("Select Distinct(a.TenKhoaHoc) "
                + "from KhoaHoc a,Khoa b "
                + "where a.KhoaID = b.KhoaID and b.TenKhoa = N'" + cbbKYKhoa3.getSelectedItem().toString() + "'");
        cbbKyKhoaHoc2.setModel(cbbmodel);
    }//GEN-LAST:event_cbbKYKhoa3ItemStateChanged

    private void jPanel5ComponentShown(java.awt.event.ComponentEvent evt) {//GEN-FIRST:event_jPanel5ComponentShown
        // TODO add your handling code here:
        SetData("Select a.LopID, a.TenLop,b.TenKhoaHoc,c.TenKhoa from Lop a,KhoaHoc b,Khoa c"
                + " where a.KhoaHocID=b.KhoaHocID and b.KhoaID = c.KhoaID");
        tableLop.setModel(model);
        SetDataCombobox("Select TenKhoa from Khoa");
        cbblopKhoa1.setModel(cbbmodel);
        cbblopkhoa2.setModel(cbbmodel);
        SetDataCombobox("Select Distinct(a.TenKhoaHoc) "
                + "from KhoaHoc a,Khoa b "
                + "where a.KhoaID = b.KhoaID and b.TenKhoa = N'" + cbblopKhoa1.getSelectedItem().toString() + "'");
        cbblopKhoaHoc1.setModel(cbbmodel);
        cbblopkhoahoc2.setModel(cbbmodel);

    }//GEN-LAST:event_jPanel5ComponentShown

    private void cbblopKhoa1ItemStateChanged(java.awt.event.ItemEvent evt) {//GEN-FIRST:event_cbblopKhoa1ItemStateChanged
        // TODO add your handling code here:
        SetDataCombobox("Select Distinct(a.TenKhoaHoc) "
                + "from KhoaHoc a,Khoa b "
                + "where a.KhoaID = b.KhoaID and b.TenKhoa = N'" + cbblopKhoa1.getSelectedItem().toString() + "'");
        cbblopKhoaHoc1.setModel(cbbmodel);
    }//GEN-LAST:event_cbblopKhoa1ItemStateChanged

    private void btnlopresetActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnlopresetActionPerformed
        // TODO add your handling code here:
        txtloptenlop1.setText("");
        cbblopKhoa1.setSelectedIndex(0);
        cbblopKhoaHoc1.setSelectedIndex(0);
    }//GEN-LAST:event_btnlopresetActionPerformed

    private void tableLopMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_tableLopMouseClicked
        // TODO add your handling code here:
        qllopEdit.setVisible(true);
        qllopCreate.setVisible(false);
        txtloplopid.setEditable(false);
        txtloplopid.setText(tableLop.getValueAt(tableLop.getSelectedRow(), 0).toString());
        txtloptenlop2.setText(tableLop.getValueAt(tableLop.getSelectedRow(), 1).toString());
        cbblopkhoa2.setSelectedItem(tableLop.getValueAt(tableLop.getSelectedRow(), 3).toString());
        cbblopkhoahoc2.setSelectedItem(tableLop.getValueAt(tableLop.getSelectedRow(), 2).toString());
    }//GEN-LAST:event_tableLopMouseClicked

    private void cbblopkhoa2ItemStateChanged(java.awt.event.ItemEvent evt) {//GEN-FIRST:event_cbblopkhoa2ItemStateChanged
        // TODO add your handling code here:
        SetDataCombobox("Select Distinct(a.TenKhoaHoc) "
                + " from KhoaHoc a,Khoa b "
                + " where a.KhoaID = b.KhoaID and b.TenKhoa = N'" + cbblopkhoa2.getSelectedItem().toString() + "'");
        cbblopkhoahoc2.setModel(cbbmodel);
    }//GEN-LAST:event_cbblopkhoa2ItemStateChanged

    private void txtSearchLopKeyPressed(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_txtSearchLopKeyPressed
        // TODO add your handling code here:
        try {
            String key = txtSearchLop.getText().trim();
            String sql = "";
            if (checkIfNumber(key.substring(1, key.length())) && key.substring(0, 1).equals("L")) {
                sql = "Select a.LopID, a.TenLop,b.TenKhoaHoc,c.TenKhoa from Lop a,KhoaHoc b,Khoa c"
                        + " where a.KhoaHocID=b.KhoaHocID and b.KhoaID = c.KhoaID and LopID='" + key + "'";
            } else {
                sql = "Select a.LopID, a.TenLop,b.TenKhoaHoc,c.TenKhoa from Lop a,KhoaHoc b,Khoa c"
                        + " where a.KhoaHocID=b.KhoaHocID and b.KhoaID = c.KhoaID and "
                        + "(a.TenLop like N'%" + key + "%' "
                        + "or b.TenKhoaHoc like N'%" + key + "%' "
                        + "or c.TenKhoa like N'%" + key + "%' )";
            }

            SetData(sql);
            tableLop.setModel(model);
        } catch (Exception ex) {
        }
    }//GEN-LAST:event_txtSearchLopKeyPressed

    private void txtSearchLopKeyReleased(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_txtSearchLopKeyReleased
        // TODO add your handling code here:
        String key = txtSearchLop.getText().trim();
        String sql = "";
        if (key.equals("")) {
            sql = "Select a.LopID, a.TenLop,b.TenKhoaHoc,c.TenKhoa from Lop a,KhoaHoc b,Khoa c"
                    + " where a.KhoaHocID=b.KhoaHocID and b.KhoaID = c.KhoaID";
            SetData(sql);
            tableLop.setModel(model);
        }
    }//GEN-LAST:event_txtSearchLopKeyReleased

    private void jPanel6ComponentShown(java.awt.event.ComponentEvent evt) {//GEN-FIRST:event_jPanel6ComponentShown
        // TODO add your handling code here:
        SetData("Select a.NhomID,a.TenNhom,b.TenKy,c.TenKhoaHoc,d.TenKhoa,a.TrangThai  "
                + "from Nhom a, Ky b, KhoaHoc c,Khoa d "
                + "where a.KyID=b.KyID and b.KhoaHocID = c.KhoaHocID and c.KhoaID = d.KhoaID order by(a.NhomID) DESC");
        tableNhom.setModel(model);

        SetDataCombobox("Select TenKhoa from Khoa");
        cbbnhomkhoa1.setModel(cbbmodel);
        cbbnhomkhoa2.setModel(cbbmodel);
        SetDataCombobox("Select Distinct(a.TenKhoaHoc) "
                + "from KhoaHoc a,Khoa b "
                + "where a.KhoaID = b.KhoaID and b.TenKhoa = N'" + cbbnhomkhoa1.getSelectedItem().toString() + "'");
        cbbnhomkhoahoc1.setModel(cbbmodel);
        SetDataCombobox("Select Distinct(a.TenKhoaHoc) "
                + "from KhoaHoc a,Khoa b "
                + "where a.KhoaID = b.KhoaID and b.TenKhoa = N'" + cbbnhomkhoa2.getSelectedItem().toString() + "'");
        cbbnhomkhoahoc2.setModel(cbbmodel);
        SetDataCombobox("Select Distinct(a.TenKy) from Ky a,KhoaHoc b,Khoa c "
                + "where a.KhoaHocID = b.KhoaHocID and b.KhoaID = c.KhoaID and "
                + "b.TenKhoaHoc = N'" + cbbnhomkhoahoc1.getSelectedItem().toString() + "' and "
                + "c.TenKhoa= N'" + cbbnhomkhoa1.getSelectedItem().toString() + "'");
        cbbnhomky1.setModel(cbbmodel);
        SetDataCombobox("Select Distinct(a.TenKy) from Ky a,KhoaHoc b,Khoa c "
                + "where a.KhoaHocID = b.KhoaHocID and b.KhoaID = c.KhoaID and "
                + "b.TenKhoaHoc = N'" + cbbnhomkhoahoc2.getSelectedItem().toString() + "' and "
                + "c.TenKhoa= N'" + cbbnhomkhoa2.getSelectedItem().toString() + "'");
        cbbnhomky2.setModel(cbbmodel);
    }//GEN-LAST:event_jPanel6ComponentShown

    private void cbbnhomkhoa1ItemStateChanged(java.awt.event.ItemEvent evt) {//GEN-FIRST:event_cbbnhomkhoa1ItemStateChanged
        // TODO add your handling code here:
        SetDataCombobox("Select Distinct(a.TenKhoaHoc) "
                + "from KhoaHoc a,Khoa b "
                + "where a.KhoaID = b.KhoaID and b.TenKhoa = N'" + cbbnhomkhoa1.getSelectedItem().toString() + "'");
        cbbnhomkhoahoc1.setModel(cbbmodel);
        SetDataCombobox("Select Distinct(a.TenKy) from Ky a,KhoaHoc b,Khoa c "
                + "where a.KhoaHocID = b.KhoaHocID and b.KhoaID = c.KhoaID and "
                + "b.TenKhoaHoc = N'" + cbbnhomkhoahoc1.getSelectedItem().toString() + "' and "
                + "c.TenKhoa= N'" + cbbnhomkhoa1.getSelectedItem().toString() + "'");
        cbbnhomky1.setModel(cbbmodel);
    }//GEN-LAST:event_cbbnhomkhoa1ItemStateChanged

    private void cbbnhomkhoahoc1ItemStateChanged(java.awt.event.ItemEvent evt) {//GEN-FIRST:event_cbbnhomkhoahoc1ItemStateChanged
        // TODO add your handling code here:
        SetDataCombobox("Select Distinct(a.TenKy) from Ky a,KhoaHoc b,Khoa c "
                + "where a.KhoaHocID = b.KhoaHocID and b.KhoaID = c.KhoaID and "
                + "b.TenKhoaHoc = N'" + cbbnhomkhoahoc1.getSelectedItem().toString() + "' and "
                + "c.TenKhoa= N'" + cbbnhomkhoa1.getSelectedItem().toString() + "'");
        cbbnhomky1.setModel(cbbmodel);
    }//GEN-LAST:event_cbbnhomkhoahoc1ItemStateChanged

    private void btnnhomresetActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnnhomresetActionPerformed
        // TODO add your handling code here:
        txtnhomtennhom1.setText("");
        cbbnhomkhoa1.setSelectedIndex(0);
        cbbnhomkhoahoc1.setSelectedIndex(0);
        cbbnhomky1.setSelectedIndex(0);
        cbbnhomtt1.setSelectedIndex(0);
    }//GEN-LAST:event_btnnhomresetActionPerformed

    private void tableNhomMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_tableNhomMouseClicked
        // TODO add your handling code here:
        qlnhomCreate.setVisible(false);
        ;
        qlnhomEdit.setVisible(true);
        txtnhomnhomid.setEditable(false);
        txtnhomnhomid.setText(tableNhom.getValueAt(tableNhom.getSelectedRow(), 0).toString());
        txtnhomtennhom2.setText(tableNhom.getValueAt(tableNhom.getSelectedRow(), 1).toString());
        cbbnhomkhoa2.setSelectedItem(tableNhom.getValueAt(tableNhom.getSelectedRow(), 4).toString());
        cbbnhomkhoahoc2.setSelectedItem(tableNhom.getValueAt(tableNhom.getSelectedRow(), 3).toString());
        cbbnhomky2.setSelectedItem(tableNhom.getValueAt(tableNhom.getSelectedRow(), 2).toString());
        cbbnhomtt2.setSelectedItem(tableNhom.getValueAt(tableNhom.getSelectedRow(), 5).toString());

    }//GEN-LAST:event_tableNhomMouseClicked

    private void txtSearchNhomKeyPressed(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_txtSearchNhomKeyPressed
        // TODO add your handling code here:
        try {
            String key = txtSearchNhom.getText().trim();
            String sql = "";
            if (checkIfNumber(key.substring(1, key.length())) && key.substring(0, 1).equals("N")) {
                sql = "Select a.NhomID,a.TenNhom,b.TenKy,c.TenKhoaHoc,d.TenKhoa,a.TrangThai "
                        + "from Nhom a, Ky b, KhoaHoc c,Khoa d "
                        + "where a.KyID=b.KyID and b.KhoaHocID = c.KhoaHocID and c.KhoaID = d.KhoaID and a.NhomID='" + key + "'";
            } else {
                sql = "Select a.NhomID,a.TenNhom,b.TenKy,c.TenKhoaHoc,d.TenKhoa,a.TrangThai "
                        + "from Nhom a, Ky b, KhoaHoc c,Khoa d "
                        + "where a.KyID=b.KyID and b.KhoaHocID = c.KhoaHocID and c.KhoaID = d.KhoaID "
                        + "and (a.TenNhom like N'%" + key + "%' "
                        + "or b.TenKy like N'%" + key + "%' "
                        + "or c.TenKhoaHoc like N'%" + key + "%' "
                        + "or d.TenKhoa like N'%" + key + "%')";
            }

            SetData(sql);
            tableNhom.setModel(model);
        } catch (Exception ex) {
        }
    }//GEN-LAST:event_txtSearchNhomKeyPressed

    private void txtSearchNhomKeyReleased(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_txtSearchNhomKeyReleased
        // TODO add your handling code here:
        String key = txtSearchNhom.getText().trim();
        String sql = "";
        if (key.equals("")) {
            sql = "Select a.NhomID,a.TenNhom,b.TenKy,c.TenKhoaHoc,d.TenKhoa,a.TrangThai "
                    + "from Nhom a, Ky b, KhoaHoc c,Khoa d "
                    + "where a.KyID=b.KyID and b.KhoaHocID = c.KhoaHocID and c.KhoaID = d.KhoaID";
            SetData(sql);
            tableNhom.setModel(model);
        }
    }//GEN-LAST:event_txtSearchNhomKeyReleased

    private void jPanel7ComponentShown(java.awt.event.ComponentEvent evt) {//GEN-FIRST:event_jPanel7ComponentShown
        // TODO add your handling code here:
        SetData("Select a.MonHocID,a.TenMon, a.TongSoTiet, b.TenKhoa, a.TrangThai "
                + "from MonHoc a, Khoa b "
                + "where a.KhoaID=b.KhoaID order by(a.MonHocID)");
        tableMon.setModel(model);
        SetDataCombobox("Select TenKhoa from Khoa");
        cbbmhkhoa1.setModel(cbbmodel);
        cbbmhKhoa2.setModel(cbbmodel);
    }//GEN-LAST:event_jPanel7ComponentShown

    private void btnmhresetActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnmhresetActionPerformed
        // TODO add your handling code here:
        txtmhtenmon1.setText("");
        txtmhtong1.setText("");
        cbbmhkhoa1.setSelectedIndex(0);
        cbbmhtt1.setSelectedIndex(0);
    }//GEN-LAST:event_btnmhresetActionPerformed

    private void tableMonMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_tableMonMouseClicked
        // TODO add your handling code here:
        qlmonCreate.setVisible(false);
        ;
        qlmonEdit.setVisible(true);
        txtmhmonhocid.setEditable(false);
        txtmhmonhocid.setText(tableMon.getValueAt(tableMon.getSelectedRow(), 0).toString());
        txtmhtenmon2.setText(tableMon.getValueAt(tableMon.getSelectedRow(), 1).toString());
        txtmhtong2.setText(tableMon.getValueAt(tableMon.getSelectedRow(), 2).toString());
        cbbmhKhoa2.setSelectedItem(tableMon.getValueAt(tableMon.getSelectedRow(), 3).toString());
        cbbmhtt1.setSelectedItem(tableMon.getValueAt(tableMon.getSelectedRow(), 4).toString());

    }//GEN-LAST:event_tableMonMouseClicked

    private void txtSearchMonHocKeyPressed(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_txtSearchMonHocKeyPressed
        // TODO add your handling code here:
        try {
            String key = txtSearchMonHoc.getText().trim();
            String sql = "";
            if (checkIfNumber(key.substring(1, key.length())) && key.substring(0, 1).equals("M")) {
                sql = "Select a.MonHocID,a.TenMon, a.TongSoTiet, b.TenKhoa, a.TrangThai from MonHoc a, Khoa b "
                        + "where a.KhoaID=b.KhoaID and a.MonHocID='" + key + "'";
            } else {
                sql = "Select a.MonHocID,a.TenMon, a.TongSoTiet, b.TenKhoa, a.TrangThai from MonHoc a, Khoa b "
                        + "where a.KhoaID=b.KhoaID and ( a.TenMon like N'%" + key + "%' "
                        + "or b.TenKhoa like N'%" + key + "%' "
                        + "or a.TrangThai like N'%" + key + "%' "
                        + "or a.TongSoTiet like N'%" + key + "%')";
            }

            SetData(sql);
            tableMon.setModel(model);
        } catch (Exception ex) {
        }
    }//GEN-LAST:event_txtSearchMonHocKeyPressed

    private void txtSearchMonHocKeyReleased(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_txtSearchMonHocKeyReleased
        // TODO add your handling code here:
        String key = txtSearchMonHoc.getText().trim();
        String sql = "";
        if (key.equals("")) {
            sql = "Select a.MonHocID,a.TenMon, a.TongSoTiet, b.TenKhoa, a.TrangThai from MonHoc a, Khoa b "
                    + "where a.KhoaID=b.KhoaID";
            SetData(sql);
            tableMon.setModel(model);
        }
    }//GEN-LAST:event_txtSearchMonHocKeyReleased

    private void jPanel8ComponentShown(java.awt.event.ComponentEvent evt) {//GEN-FIRST:event_jPanel8ComponentShown
        // TODO add your handling code here:
        SetData("Select a.SinhVienID,a.TenSinhVien,b.TenLop,a.GioiTinh,a.NgaySinh,a.Email,a.DienThoai "
                + "from SinhVien a,Lop b "
                + "where a.LopID=b.LopID  "
                + "order by(a.SinhVienID) DESC");
        tableSinhvien.setModel(model);
        SetDataCombobox("Select TenKhoa from Khoa");
        cbbsvkhoa1.setModel(cbbmodel);
        cbbsvkhoa2.setModel(cbbmodel);
        SetDataCombobox("Select Distinct(a.TenKhoaHoc) "
                + "from KhoaHoc a,Khoa b "
                + "where a.KhoaID = b.KhoaID and b.TenKhoa = N'" + cbbsvkhoa1.getSelectedItem().toString() + "'");
        cbbsvkhoahoc1.setModel(cbbmodel);
        SetDataCombobox("Select Distinct(a.TenKhoaHoc) "
                + "from KhoaHoc a,Khoa b "
                + "where a.KhoaID = b.KhoaID and b.TenKhoa = N'" + cbbsvkhoa2.getSelectedItem().toString() + "'");
        cbbsvkhoahoc2.setModel(cbbmodel);
        SetDataCombobox("Select distinct(a.TenLop) from Lop a, KhoaHoc b,Khoa c "
                + "where a.KhoaHocID=b.KhoaHocID and b.KhoaID = c.KhoaID "
                + "and b.TenKhoaHoc=N'" + cbbsvkhoahoc1.getSelectedItem().toString() + "' "
                + "and c.TenKhoa = N'" + cbbsvkhoa1.getSelectedItem().toString() + "'");
        cbbsvlop1.setModel(cbbmodel);
        SetDataCombobox("Select distinct(a.TenLop) from Lop a, KhoaHoc b,Khoa c "
                + "where a.KhoaHocID=b.KhoaHocID and b.KhoaID = c.KhoaID "
                + "and b.TenKhoaHoc=N'" + cbbsvkhoahoc2.getSelectedItem().toString() + "' "
                + "and c.TenKhoa = N'" + cbbsvkhoa2.getSelectedItem().toString() + "'");
        cbbsvlop2.setModel(cbbmodel);
        datesvngaysinh1.setDateFormatString("dd/MM/yyyy");
        datesvngaysinh2.setDateFormatString("dd/MM/yyyy");


    }//GEN-LAST:event_jPanel8ComponentShown

    private void cbbsvkhoa1ItemStateChanged(java.awt.event.ItemEvent evt) {//GEN-FIRST:event_cbbsvkhoa1ItemStateChanged
        // TODO add your handling code here:
        SetDataCombobox("Select Distinct(a.TenKhoaHoc) "
                + "from KhoaHoc a,Khoa b "
                + "where a.KhoaID = b.KhoaID and b.TenKhoa = N'" + cbbsvkhoa1.getSelectedItem().toString() + "'");
        cbbsvkhoahoc1.setModel(cbbmodel);
        SetDataCombobox("Select distinct(a.TenLop) from Lop a, KhoaHoc b,Khoa c "
                + "where a.KhoaHocID=b.KhoaHocID and b.KhoaID = c.KhoaID "
                + "and b.TenKhoaHoc=N'" + cbbsvkhoahoc1.getSelectedItem().toString() + "' "
                + "and c.TenKhoa = N'" + cbbsvkhoa1.getSelectedItem().toString() + "'");
        cbbsvlop1.setModel(cbbmodel);

    }//GEN-LAST:event_cbbsvkhoa1ItemStateChanged

    private void cbbsvkhoa2ItemStateChanged(java.awt.event.ItemEvent evt) {//GEN-FIRST:event_cbbsvkhoa2ItemStateChanged
        // TODO add your handling code here:
        SetDataCombobox("Select Distinct(a.TenKhoaHoc) "
                + "from KhoaHoc a,Khoa b "
                + "where a.KhoaID = b.KhoaID and b.TenKhoa = N'" + cbbsvkhoa2.getSelectedItem().toString() + "'");
        cbbsvkhoahoc2.setModel(cbbmodel);
        SetDataCombobox("Select distinct(a.TenLop) from Lop a, KhoaHoc b,Khoa c "
                + "where a.KhoaHocID=b.KhoaHocID and b.KhoaID = c.KhoaID "
                + "and b.TenKhoaHoc=N'" + cbbsvkhoahoc2.getSelectedItem().toString() + "' "
                + "and c.TenKhoa = N'" + cbbsvkhoa2.getSelectedItem().toString() + "'");
        cbbsvlop2.setModel(cbbmodel);
    }//GEN-LAST:event_cbbsvkhoa2ItemStateChanged

    private void cbbsvkhoahoc2ItemStateChanged(java.awt.event.ItemEvent evt) {//GEN-FIRST:event_cbbsvkhoahoc2ItemStateChanged
        // TODO add your handling code here:

        SetDataCombobox("Select distinct(a.TenLop) from Lop a, KhoaHoc b,Khoa c "
                + "where a.KhoaHocID=b.KhoaHocID and b.KhoaID = c.KhoaID "
                + "and b.TenKhoaHoc=N'" + cbbsvkhoahoc2.getSelectedItem().toString() + "' "
                + "and c.TenKhoa = N'" + cbbsvkhoa2.getSelectedItem().toString() + "'");
        cbbsvlop2.setModel(cbbmodel);

    }//GEN-LAST:event_cbbsvkhoahoc2ItemStateChanged

    private void cbbsvkhoahoc1ItemStateChanged(java.awt.event.ItemEvent evt) {//GEN-FIRST:event_cbbsvkhoahoc1ItemStateChanged
        // TODO add your handling code here:
        SetDataCombobox("Select distinct(a.TenLop) from Lop a, KhoaHoc b,Khoa c "
                + "where a.KhoaHocID=b.KhoaHocID and b.KhoaID = c.KhoaID "
                + "and b.TenKhoaHoc=N'" + cbbsvkhoahoc1.getSelectedItem().toString() + "' "
                + "and c.TenKhoa = N'" + cbbsvkhoa1.getSelectedItem().toString() + "'");
        cbbsvlop1.setModel(cbbmodel);
    }//GEN-LAST:event_cbbsvkhoahoc1ItemStateChanged

    private void btnsvresetActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnsvresetActionPerformed

        // TODO add your handling code here:
        txtsvhoten1.setText("");
        cbbsvkhoa1.setSelectedIndex(0);
        cbbsvkhoahoc1.setSelectedIndex(0);
        cbbsvlop1.setSelectedIndex(0);
        datesvngaysinh1.cleanup();
        txtsvdantoc1.setText("");
        txtsvquoctich1.setText("");
        txtsvemail1.setText("");
        txtsvdienthoai1.setText("");
        txtsvcmnd1.setText("");
        txtsvdiachi1.setText("");
        cbbsvtt1.setSelectedIndex(0);
    }//GEN-LAST:event_btnsvresetActionPerformed

    private void tableSinhvienMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_tableSinhvienMouseClicked
        // TODO add your handling code here:
        qlsvCreate.setVisible(false);
        qlsvEdit.setVisible(true);
        txtsvsinhvienid.setEditable(false);
        txtsvsinhvienid.setText(tableSinhvien.getValueAt(tableSinhvien.getSelectedRow(), 0).toString());
        txtsvhoten2.setText(tableSinhvien.getValueAt(tableSinhvien.getSelectedRow(), 1).toString());

        try {
            call = con.prepareCall("Select a.TenKhoa , b.TenKhoaHoc, c.QuocTich,c.DanToc,c.CMND,c.DiaChi,c.TrangThai "
                    + "from Khoa a,KhoaHoc b,SinhVien c,Lop d "
                    + "where a.KhoaID = b.KhoaID and b.KhoaHocID = d.KhoaHocID "
                    + "and d.LopID = c.LopID and c.SinhVienID = '" + txtsvsinhvienid.getText() + "'");
            ResultSet rs1 = call.executeQuery();
            rs1.next();
            cbbsvkhoa2.setSelectedItem(rs1.getString("TenKhoa"));
            //load lai cac item trong cac combobox khoahoc va lop
            SetDataCombobox("Select Distinct(a.TenKhoaHoc) "
                    + "from KhoaHoc a,Khoa b "
                    + "where a.KhoaID = b.KhoaID and b.TenKhoa = N'" + cbbsvkhoa2.getSelectedItem().toString() + "'");
            cbbsvkhoahoc2.setModel(cbbmodel);
            SetDataCombobox("Select distinct(a.TenLop) from Lop a, KhoaHoc b,Khoa c "
                    + "where a.KhoaHocID=b.KhoaHocID and b.KhoaID = c.KhoaID "
                    + "and b.TenKhoaHoc=N'" + cbbsvkhoahoc2.getSelectedItem().toString() + "' "
                    + "and c.TenKhoa = N'" + cbbsvkhoa2.getSelectedItem().toString() + "'");
            cbbsvlop2.setModel(cbbmodel);
            //load xong
            cbbsvkhoahoc2.setSelectedItem(rs1.getString("TenKhoaHoc"));
            //load lai lop
            SetDataCombobox("Select distinct(a.TenLop) from Lop a, KhoaHoc b,Khoa c "
                    + "where a.KhoaHocID=b.KhoaHocID and b.KhoaID = c.KhoaID "
                    + "and b.TenKhoaHoc=N'" + cbbsvkhoahoc2.getSelectedItem().toString() + "' "
                    + "and c.TenKhoa = N'" + cbbsvkhoa2.getSelectedItem().toString() + "'");
            cbbsvlop2.setModel(cbbmodel);

            cbbsvlop2.setSelectedItem(tableSinhvien.getValueAt(tableSinhvien.getSelectedRow(), 2).toString());
            txtsvquoctich2.setText(rs1.getString("QuocTich"));
            txtsvdantoc2.setText(rs1.getString("DanToc"));
            txtsvcmnd2.setText(rs1.getString("CMND"));
            txtsvdiachi2.setText(rs1.getString("DiaChi"));
            cbbsvtt2.setSelectedItem(rs1.getString("TrangThai"));
            rs1.close();
        } catch (Exception ex) {
            System.out.println(ex.getMessage());
        }

        cbbsvgioitinh2.setSelectedItem(tableSinhvien.getValueAt(tableSinhvien.getSelectedRow(), 3).toString());
        datesvngaysinh2.setDate(formatStringToDate(tableSinhvien.getValueAt(tableSinhvien.getSelectedRow(), 4).toString()));
        txtsvemail2.setText(tableSinhvien.getValueAt(tableSinhvien.getSelectedRow(), 5).toString());
        txtsvdienthoai2.setText(tableSinhvien.getValueAt(tableSinhvien.getSelectedRow(), 6).toString());



    }//GEN-LAST:event_tableSinhvienMouseClicked

    private void txtSearchSinhvienKeyPressed(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_txtSearchSinhvienKeyPressed
        // TODO add your handling code here:
        try {
            String key = txtSearchSinhvien.getText().trim();
            String sql = "";
            if (checkIfNumber(key.substring(2, key.length())) && key.substring(0, 2).equals("SV")) {
                sql = "Select a.SinhVienID,a.TenSinhVien,b.TenLop,a.GioiTinh,a.NgaySinh,a.Email,a.DienThoai "
                        + "from SinhVien a,Lop b "
                        + "where a.LopID=b.LopID and a.SinhVienID='" + key + "'";
            } else {
                sql = "Select a.SinhVienID,a.TenSinhVien,b.TenLop,a.GioiTinh,a.NgaySinh,a.Email,a.DienThoai "
                        + "from SinhVien a,Lop b "
                        + "where a.LopID=b.LopID and (a.TenSinhVien like N'%" + key + "%' "
                        + "or b.TenLop like N'%" + key + "%' "
                        + "or a.NgaySinh like N'%" + key + "%' "
                        + "or a.Email like N'%" + key + "%' "
                        + "or a.DienThoai like N'%" + key + "%' "
                        + "or a.CMND like N'%" + key + "%' "
                        + "or a.DiaChi like N'%" + key + "%' "
                        + "or a.TrangThai like N'%" + key + "%')";
            }

            SetData(sql);
            tableSinhvien.setModel(model);
        } catch (Exception ex) {
        }
    }//GEN-LAST:event_txtSearchSinhvienKeyPressed

    private void txtSearchSinhvienKeyReleased(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_txtSearchSinhvienKeyReleased
        // TODO add your handling code here:
        String key = txtSearchSinhvien.getText().trim();
        String sql = "";
        if (key.equals("")) {
            sql = "Select a.SinhVienID,a.TenSinhVien,b.TenLop,a.GioiTinh,a.NgaySinh,a.Email,a.DienThoai "
                    + "from SinhVien a,Lop b where a.LopID=b.LopID ";
            SetData(sql);
            tableSinhvien.setModel(model);
        }
    }//GEN-LAST:event_txtSearchSinhvienKeyReleased

    private void jPanel9ComponentShown(java.awt.event.ComponentEvent evt) {//GEN-FIRST:event_jPanel9ComponentShown
        // TODO add your handling code here:
        SetData("select a.GiangVienID,a.TenGiangVien,b.TenKhoa,a.NgaySinh,a.GioiTinh,a.Email,a.DienThoai from GiangVien a,Khoa b "
                + "where a.KhoaID = b.KhoaID order by(a.GiangVienID)");
        tableGiangVien.setModel(model);
        SetDataCombobox("Select TenKhoa from Khoa");
        cbbgvkhoa1.setModel(cbbmodel);
        cbbgvkhoa2.setModel(cbbmodel);
        dategvngaysinh1.setDateFormatString("dd/MM/yyyy");
        dategvNgaysinh2.setDateFormatString("dd/MM/yyyy");


    }//GEN-LAST:event_jPanel9ComponentShown

    private void txtSearchGiangVienKeyPressed(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_txtSearchGiangVienKeyPressed
        // TODO add your handling code here:
        try {
            String key = txtSearchGiangVien.getText().trim();
            String sql = "";
            if (checkIfNumber(key.substring(2, key.length())) && key.substring(0, 2).equals("GV")) {
                sql = "select a.GiangVienID,a.TenGiangVien,b.TenKhoa,a.NgaySinh,a.GioiTinh,a.Email,a.DienThoai "
                        + "from GiangVien a,Khoa b "
                        + "where a.KhoaID = b.KhoaID and GiangVienID='" + key + "'";
            } else {
                sql = "select a.GiangVienID,a.TenGiangVien,b.TenKhoa,a.NgaySinh,a.GioiTinh,a.Email,a.DienThoai "
                        + "from GiangVien a,Khoa b "
                        + "where a.KhoaID = b.KhoaID and (a.TenGiangVien like N'%" + key + "%' "
                        + "or b.TenKhoa like N'%" + key + "%' "
                        + "or a.NgaySinh like N'%" + key + "%' "
                        + "or a.GioiTinh like N'%" + key + "%' "
                        + "or a.Email like N'%" + key + "%' "
                        + "or a.DienThoai like N'%" + key + "%')";
            }

            SetData(sql);
            tableGiangVien.setModel(model);
        } catch (Exception ex) {
        }
    }//GEN-LAST:event_txtSearchGiangVienKeyPressed

    private void txtSearchGiangVienKeyReleased(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_txtSearchGiangVienKeyReleased
        // TODO add your handling code here:
        String key = txtSearchGiangVien.getText().trim();
        String sql = "";
        if (key.equals("")) {
            sql = "select a.GiangVienID,a.TenGiangVien,b.TenKhoa,a.NgaySinh,a.GioiTinh,a.Email,a.DienThoai "
                    + "from GiangVien a,Khoa b "
                    + "where a.KhoaID = b.KhoaID";
            SetData(sql);
            tableGiangVien.setModel(model);
        }
    }//GEN-LAST:event_txtSearchGiangVienKeyReleased

    private void btngvResetActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btngvResetActionPerformed
        // TODO add your handling code here:
        txtgvhoten1.setText("");
        cbbgvkhoa1.setSelectedIndex(0);
        cbbgvgioitinh1.setSelectedIndex(0);
        txtgvquoctich1.setText("");
        txtgvdantoc1.setText("");
        txtgvemail1.setText("");
        txtgvdienthoai1.setText("");
        txtgvdiachi1.setText("");
        txtgvhocvi1.setText("");
        cbbgvgioitinh1.setSelectedIndex(0);
        dategvngaysinh1.cleanup();
        txtgvcmnd1.setText("");
    }//GEN-LAST:event_btngvResetActionPerformed

    private void tableGiangVienMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_tableGiangVienMouseClicked
        // TODO add your handling code here:
        qlgvCreate.setVisible(false);
        qlgvEdit.setVisible(true);
        txtgvgvid.setEditable(false);
        txtgvgvid.setText(tableGiangVien.getValueAt(tableGiangVien.getSelectedRow(), 0).toString());
        txtgvhoten2.setText(tableGiangVien.getValueAt(tableGiangVien.getSelectedRow(), 1).toString());
        cbbgvkhoa2.setSelectedItem(tableGiangVien.getValueAt(tableGiangVien.getSelectedRow(), 2).toString());
        dategvNgaysinh2.setDate(formatStringToDate(tableGiangVien.getValueAt(tableGiangVien.getSelectedRow(), 3).toString()));
        cbbgvgioitinh2.setSelectedItem(tableGiangVien.getValueAt(tableGiangVien.getSelectedRow(), 4).toString());
        txtgvemail2.setText(tableGiangVien.getValueAt(tableGiangVien.getSelectedRow(), 5).toString());
        txtgvdienthoai2.setText(tableGiangVien.getValueAt(tableGiangVien.getSelectedRow(), 6).toString());
        try {
            call = con.prepareCall("Select QuocTich,DanToc,HocVi,CMND,DiaChi,TrangThai "
                    + "from GiangVien "
                    + "where GiangVienID= '" + txtgvgvid.getText() + "'");
            ResultSet rs1 = call.executeQuery();
            rs1.next();
            txtgvquoctich2.setText(rs1.getString("QuocTich"));
            txtgvdantoc2.setText(rs1.getString("DanToc"));
            txtgvcmnd2.setText(rs1.getString("CMND"));
            txtgvdiachi2.setText(rs1.getString("DiaChi"));
            cbbgvtt2.setSelectedItem(rs1.getString("TrangThai"));
            txtgvhocvi2.setText(rs1.getString("HocVi"));
            rs1.close();
        } catch (Exception ex) {
            System.out.println(ex.getMessage());
        }
    }//GEN-LAST:event_tableGiangVienMouseClicked

    private void cbbtkbtbd2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_cbbtkbtbd2ActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_cbbtkbtbd2ActionPerformed

    private void jPanel10ComponentShown(java.awt.event.ComponentEvent evt) {//GEN-FIRST:event_jPanel10ComponentShown
        // TODO add your handling code here:
        SetDataCombobox("Select TenKhoa from Khoa");
        cbbtkbkhoa.setModel(cbbmodel);
        SetDataCombobox("Select Distinct(a.TenKhoaHoc) "
                + "from KhoaHoc a,Khoa b "
                + "where a.KhoaID = b.KhoaID and b.TenKhoa = N'" + cbbtkbkhoa.getSelectedItem().toString() + "'");
        cbbtkbkhoahoc.setModel(cbbmodel);
        System.out.println("Select a.TenKy from Ky a, KhoaHoc b,Khoa c "
                + "where a.KhoaHocID = b.KhoaHocID and b.KhoaID = c.KhoaID "
                + "and b.TenKhoaHoc = N'" + cbbtkbkhoahoc.getSelectedItem().toString() + "' "
                + "and c.TenKhoa = N'" + cbbtkbkhoa.getSelectedItem().toString() + "'");
        SetDataCombobox("Select a.TenKy from Ky a, KhoaHoc b,Khoa c "
                + "where a.KhoaHocID = b.KhoaHocID and b.KhoaID = c.KhoaID "
                + "and b.TenKhoaHoc = N'" + cbbtkbkhoahoc.getSelectedItem().toString() + "' "
                + "and c.TenKhoa = N'" + cbbtkbkhoa.getSelectedItem().toString() + "'");
        cbbtkbky.setModel(cbbmodel);
        SetDataCombobox("Select d.TenNhom from Ky a, KhoaHoc b,Khoa c, Nhom d "
                + "where a.KhoaHocID = b.KhoaHocID and b.KhoaID = c.KhoaID and d.KyID=a.KyID "
                + "and b.TenKhoaHoc = N'" + cbbtkbkhoahoc.getSelectedItem().toString() + "' "
                + "and c.TenKhoa = N'" + cbbtkbkhoa.getSelectedItem().toString() + "' "
                + "and a.TenKy = N'" + cbbtkbky.getSelectedItem().toString() + "'");
        cbbtkbnhom.setModel(cbbmodel);

        SetDataCombobox("Select a.TenMon from MonHoc a,Khoa b where a.KhoaID=b.KhoaID and b.TenKhoa=N'" + cbbtkbkhoa.getSelectedItem().toString() + "'");
        cbbtkbmon2.setModel(cbbmodel);
        cbbtkbmon3.setModel(cbbmodel);

        SetDataCombobox("Select a.TenGiangVien from GiangVien a,Khoa b where a.KhoaID=b.KhoaID and b.TenKhoa=N'" + cbbtkbkhoa.getSelectedItem().toString() + "'");
        cbbtkbgiangvien3.setModel(cbbmodel);
        cbbtkbgiangvien2.setModel(cbbmodel);

        SetDataTKB("Select a.TKBID,b.TenMon,c.TenGiangVien,a.Thu2,a.Thu3,a.Thu4,a.Thu5,a.Thu6,a.Thu7, "
                + "a.TietBatDau,a.TietKetThuc,a.TongSoBuoi,a.Phong,a.TrangThai "
                + "from ThoiKhoaBieu a,MonHoc b,GiangVien c "
                + "where a.MonID=b.MonHocID and a.GiangVienID = c.GiangVienID "
                + "and a.NhomID in(select a.NhomID "
                + "from Nhom a,Ky b,KhoaHoc c,Khoa d "
                + "where a.KyID = b.KyID  and b.KhoaHocID = c.KhoaHocID and c.KhoaID = d.KhoaID "
                + "and d.TenKhoa=N'" + cbbtkbkhoa.getSelectedItem().toString() + "' "
                + "and c.TenKhoaHoc=N'" + cbbtkbkhoahoc.getSelectedItem().toString() + "' "
                + "and b.TenKy = N'" + cbbtkbky.getSelectedItem().toString() + "' "
                + "and a.TenNhom=N'" + cbbtkbnhom.getSelectedItem().toString() + "')");
        tableThoiKhoaBieu.setModel(model);
    }//GEN-LAST:event_jPanel10ComponentShown

    private void cbbnhomkhoa2ItemStateChanged(java.awt.event.ItemEvent evt) {//GEN-FIRST:event_cbbnhomkhoa2ItemStateChanged
        // TODO add your handling code here:
        SetDataCombobox("Select Distinct(a.TenKhoaHoc) "
                + "from KhoaHoc a,Khoa b "
                + "where a.KhoaID = b.KhoaID and b.TenKhoa = N'" + cbbnhomkhoa2.getSelectedItem().toString() + "'");
        cbbnhomkhoahoc2.setModel(cbbmodel);
    }//GEN-LAST:event_cbbnhomkhoa2ItemStateChanged

    private void cbbtkbkhoaItemStateChanged(java.awt.event.ItemEvent evt) {//GEN-FIRST:event_cbbtkbkhoaItemStateChanged
        // TODO add your handling code here:
        SetDataCombobox("Select Distinct(a.TenKhoaHoc) "
                + "from KhoaHoc a,Khoa b "
                + "where a.KhoaID = b.KhoaID and b.TenKhoa = N'" + cbbtkbkhoa.getSelectedItem().toString() + "'");
        cbbtkbkhoahoc.setModel(cbbmodel);
        SetDataCombobox("Select a.TenKy from Ky a, KhoaHoc b,Khoa c "
                + "where a.KhoaHocID = b.KhoaHocID and b.KhoaID = c.KhoaID "
                + "and b.TenKhoaHoc = N'" + cbbtkbkhoahoc.getSelectedItem().toString() + "' "
                + "and c.TenKhoa = N'" + cbbtkbkhoa.getSelectedItem().toString() + "'");
        cbbtkbky.setModel(cbbmodel);
        SetDataCombobox("Select d.TenNhom from Ky a, KhoaHoc b,Khoa c, Nhom d "
                + "where a.KhoaHocID = b.KhoaHocID and b.KhoaID = c.KhoaID and d.KyID=a.KyID "
                + "and b.TenKhoaHoc = N'" + cbbtkbkhoahoc.getSelectedItem().toString() + "' "
                + "and c.TenKhoa = N'" + cbbtkbkhoa.getSelectedItem().toString() + "' "
                + "and a.TenKy = N'" + cbbtkbky.getSelectedItem().toString() + "'");
        cbbtkbnhom.setModel(cbbmodel);

        SetDataCombobox("Select a.TenMon from MonHoc a,Khoa b where a.KhoaID=b.KhoaID and b.TenKhoa=N'" + cbbtkbkhoa.getSelectedItem().toString() + "'");
        cbbtkbmon2.setModel(cbbmodel);
        cbbtkbmon3.setModel(cbbmodel);

        SetDataCombobox("Select a.TenGiangVien from GiangVien a,Khoa b where a.KhoaID=b.KhoaID and b.TenKhoa=N'" + cbbtkbkhoa.getSelectedItem().toString() + "'");
        cbbtkbgiangvien3.setModel(cbbmodel);
        cbbtkbgiangvien2.setModel(cbbmodel);
        SetDataTKB("Select a.TKBID,b.TenMon,c.TenGiangVien,a.Thu2,a.Thu3,a.Thu4,a.Thu5,a.Thu6,a.Thu7, "
                + "a.TietBatDau,a.TietKetThuc,a.TongSoBuoi,a.Phong,a.TrangThai "
                + "from ThoiKhoaBieu a,MonHoc b,GiangVien c "
                + "where a.MonID=b.MonHocID and a.GiangVienID = c.GiangVienID "
                + "and a.NhomID in(select a.NhomID "
                + "from Nhom a,Ky b,KhoaHoc c,Khoa d "
                + "where a.KyID = b.KyID  and b.KhoaHocID = c.KhoaHocID and c.KhoaID = d.KhoaID "
                + "and d.TenKhoa=N'" + cbbtkbkhoa.getSelectedItem().toString() + "' "
                + "and c.TenKhoaHoc=N'" + cbbtkbkhoahoc.getSelectedItem().toString() + "' "
                + "and b.TenKy = N'" + cbbtkbky.getSelectedItem().toString() + "' "
                + "and a.TenNhom=N'" + cbbtkbnhom.getSelectedItem().toString() + "')");
        tableThoiKhoaBieu.setModel(model);
    }//GEN-LAST:event_cbbtkbkhoaItemStateChanged

    private void cbbtkbkhoahocItemStateChanged(java.awt.event.ItemEvent evt) {//GEN-FIRST:event_cbbtkbkhoahocItemStateChanged
        // TODO add your handling code here:
        SetDataCombobox("Select a.TenKy from Ky a, KhoaHoc b,Khoa c "
                + "where a.KhoaHocID = b.KhoaHocID and b.KhoaID = c.KhoaID "
                + "and b.TenKhoaHoc = N'" + cbbtkbkhoahoc.getSelectedItem().toString() + "' "
                + "and c.TenKhoa = N'" + cbbtkbkhoa.getSelectedItem().toString() + "'");
        cbbtkbky.setModel(cbbmodel);
        SetDataCombobox("Select d.TenNhom from Ky a, KhoaHoc b,Khoa c, Nhom d "
                + "where a.KhoaHocID = b.KhoaHocID and b.KhoaID = c.KhoaID and d.KyID=a.KyID "
                + "and b.TenKhoaHoc = N'" + cbbtkbkhoahoc.getSelectedItem().toString() + "' "
                + "and c.TenKhoa = N'" + cbbtkbkhoa.getSelectedItem().toString() + "' "
                + "and a.TenKy = N'" + cbbtkbky.getSelectedItem().toString() + "'");
        cbbtkbnhom.setModel(cbbmodel);
        SetDataTKB("Select a.TKBID,b.TenMon,c.TenGiangVien,a.Thu2,a.Thu3,a.Thu4,a.Thu5,a.Thu6,a.Thu7, "
                + "a.TietBatDau,a.TietKetThuc,a.TongSoBuoi,a.Phong,a.TrangThai "
                + "from ThoiKhoaBieu a,MonHoc b,GiangVien c "
                + "where a.MonID=b.MonHocID and a.GiangVienID = c.GiangVienID "
                + "and a.NhomID in(select a.NhomID "
                + "from Nhom a,Ky b,KhoaHoc c,Khoa d "
                + "where a.KyID = b.KyID  and b.KhoaHocID = c.KhoaHocID and c.KhoaID = d.KhoaID "
                + "and d.TenKhoa=N'" + cbbtkbkhoa.getSelectedItem().toString() + "' "
                + "and c.TenKhoaHoc=N'" + cbbtkbkhoahoc.getSelectedItem().toString() + "' "
                + "and b.TenKy = N'" + cbbtkbky.getSelectedItem().toString() + "' "
                + "and a.TenNhom=N'" + cbbtkbnhom.getSelectedItem().toString() + "')");
        tableThoiKhoaBieu.setModel(model);
    }//GEN-LAST:event_cbbtkbkhoahocItemStateChanged

    private void cbbtkbkyItemStateChanged(java.awt.event.ItemEvent evt) {//GEN-FIRST:event_cbbtkbkyItemStateChanged
        // TODO add your handling code here:
        SetDataCombobox("Select d.TenNhom from Ky a, KhoaHoc b,Khoa c, Nhom d "
                + "where a.KhoaHocID = b.KhoaHocID and b.KhoaID = c.KhoaID and d.KyID=a.KyID "
                + "and b.TenKhoaHoc = N'" + cbbtkbkhoahoc.getSelectedItem().toString() + "' "
                + "and c.TenKhoa = N'" + cbbtkbkhoa.getSelectedItem().toString() + "' "
                + "and a.TenKy = N'" + cbbtkbky.getSelectedItem().toString() + "'");
        cbbtkbnhom.setModel(cbbmodel);
        SetDataTKB("Select a.TKBID,b.TenMon,c.TenGiangVien,a.Thu2,a.Thu3,a.Thu4,a.Thu5,a.Thu6,a.Thu7, "
                + "a.TietBatDau,a.TietKetThuc,a.TongSoBuoi,a.Phong,a.TrangThai "
                + "from ThoiKhoaBieu a,MonHoc b,GiangVien c "
                + "where a.MonID=b.MonHocID and a.GiangVienID = c.GiangVienID "
                + "and a.NhomID in(select a.NhomID "
                + "from Nhom a,Ky b,KhoaHoc c,Khoa d "
                + "where a.KyID = b.KyID  and b.KhoaHocID = c.KhoaHocID and c.KhoaID = d.KhoaID "
                + "and d.TenKhoa=N'" + cbbtkbkhoa.getSelectedItem().toString() + "' "
                + "and c.TenKhoaHoc=N'" + cbbtkbkhoahoc.getSelectedItem().toString() + "' "
                + "and b.TenKy = N'" + cbbtkbky.getSelectedItem().toString() + "' "
                + "and a.TenNhom=N'" + cbbtkbnhom.getSelectedItem().toString() + "')");
        tableThoiKhoaBieu.setModel(model);
    }//GEN-LAST:event_cbbtkbkyItemStateChanged

    private void cbbtkbtkt3ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_cbbtkbtkt3ActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_cbbtkbtkt3ActionPerformed

    private void btntkbThemActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btntkbThemActionPerformed
        // TODO add your handling code here:
boolean kt=true;
        if (txttkbphong3.getText().equals(""))
        {
            JOptionPane.showMessageDialog(new JButton("OK"),"Lỗi: khung tên phòng còn trống");
            kt=false;
        }

        if (txttkbtong3.getText().equals(""))
        {
             JOptionPane.showMessageDialog(new JButton("OK"),"Lỗi: khung tổng số buổi học còn trống");
            kt=false;
        }
        else if (!(CheckNumber(txttkbtong3.getText())))
        {
             JOptionPane.showMessageDialog(new JButton("OK"),"Lỗi: Nhập sai số buổi");
            kt=false;
        }
        if (!(Integer.parseInt((String) cbbtkbtbd3.getSelectedItem())<= Integer.parseInt((String) cbbtkbtkt3.getSelectedItem())))
        {
             JOptionPane.showMessageDialog(new JButton("OK"),"Lỗi: Nhập sai tiết bắt đầu và tiết kết thúc");
            kt=false;
        }
 boolean[] thu = new boolean[6];
        for (int i = 0; i < thu.length; i++) {
            if ((i + 2) == Integer.parseInt(cbbtkbthu3.getSelectedItem().toString().substring(cbbtkbthu3.getSelectedItem().toString().length() - 1))) {
                thu[i] = true;
            } else {
                thu[i] = false;
            }
        }
        if (kt)
        
       
        try {
            call = con.prepareCall("{call ThemTKB(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)}");
            call.setString(1, cbbtkbkhoa.getSelectedItem().toString());
            call.setString(2, cbbtkbkhoahoc.getSelectedItem().toString());
            call.setString(3, cbbtkbky.getSelectedItem().toString());
            call.setString(4, cbbtkbnhom.getSelectedItem().toString());
            call.setString(5, cbbtkbmon3.getSelectedItem().toString());
            call.setBoolean(6, thu[0]);
            call.setBoolean(7, thu[1]);
            call.setBoolean(8, thu[2]);
            call.setBoolean(9, thu[3]);
            call.setBoolean(10, thu[4]);
            call.setBoolean(11, thu[5]);

            call.setString(12, cbbtkbgiangvien3.getSelectedItem().toString());
            call.setInt(13, Integer.parseInt(cbbtkbtbd3.getSelectedItem().toString()));
            call.setInt(14, Integer.parseInt(cbbtkbtkt3.getSelectedItem().toString()));
            call.setInt(15, Integer.parseInt(txttkbtong3.getText()));
            call.setString(16, txttkbphong3.getText());
            call.setString(17, cbbtkbtt3.getSelectedItem().toString());
            call.execute();
            JOptionPane.showMessageDialog(rootPane, "Thêm thời khóa biểu thành công");
            SetDataTKB("Select a.TKBID,b.TenMon,c.TenGiangVien,a.Thu2,a.Thu3,a.Thu4,a.Thu5,a.Thu6,a.Thu7, "
                    + "a.TietBatDau,a.TietKetThuc,a.TongSoBuoi,a.Phong,a.TrangThai "
                    + "from ThoiKhoaBieu a,MonHoc b,GiangVien c "
                    + "where a.MonID=b.MonHocID and a.GiangVienID = c.GiangVienID "
                    + "and a.NhomID in(select a.NhomID "
                    + "from Nhom a,Ky b,KhoaHoc c,Khoa d "
                    + "where a.KyID = b.KyID  and b.KhoaHocID = c.KhoaHocID and c.KhoaID = d.KhoaID "
                    + "and d.TenKhoa=N'" + cbbtkbkhoa.getSelectedItem().toString() + "' "
                    + "and c.TenKhoaHoc=N'" + cbbtkbkhoahoc.getSelectedItem().toString() + "' "
                    + "and b.TenKy = N'" + cbbtkbky.getSelectedItem().toString() + "' "
                    + "and a.TenNhom=N'" + cbbtkbnhom.getSelectedItem().toString() + "') "
                    + "order by(a.TKBID) DESC");
            tableThoiKhoaBieu.setModel(model);
        } catch (Exception ex) {
            JOptionPane.showMessageDialog(rootPane, "Thêm thời khóa biểu không thành công");
            System.out.println(ex.getMessage());
        }
        
    }//GEN-LAST:event_btntkbThemActionPerformed

    private void cbbtkbtbd3ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_cbbtkbtbd3ActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_cbbtkbtbd3ActionPerformed

    private void tableThoiKhoaBieuMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_tableThoiKhoaBieuMouseClicked
        // TODO add your handling code here:
        qltkbCreate.setVisible(false);
        qltkbEdit.setVisible(true);
        txttkbtkbid.setEditable(false);
        txttkbtkbid.setText(tableThoiKhoaBieu.getValueAt(tableThoiKhoaBieu.getSelectedRow(), 0).toString());
        cbbtkbgiangvien2.setSelectedItem(tableThoiKhoaBieu.getValueAt(tableThoiKhoaBieu.getSelectedRow(), 2).toString());
        cbbtkbmon2.setSelectedItem(tableThoiKhoaBieu.getValueAt(tableThoiKhoaBieu.getSelectedRow(), 1).toString());
        cbbtkbthu2.setSelectedItem("Thứ " + tableThoiKhoaBieu.getValueAt(tableThoiKhoaBieu.getSelectedRow(), 3).toString());
        cbbtkbtbd2.setSelectedItem(tableThoiKhoaBieu.getValueAt(tableThoiKhoaBieu.getSelectedRow(), 4).toString());
        cbbtkbtkt2.setSelectedItem(tableThoiKhoaBieu.getValueAt(tableThoiKhoaBieu.getSelectedRow(), 5).toString());
        txttkbtong2.setText(tableThoiKhoaBieu.getValueAt(tableThoiKhoaBieu.getSelectedRow(), 6).toString());
        txttkbphong2.setText(tableThoiKhoaBieu.getValueAt(tableThoiKhoaBieu.getSelectedRow(), 7).toString());
        cbbtkbtt2.setSelectedItem(tableThoiKhoaBieu.getValueAt(tableThoiKhoaBieu.getSelectedRow(), 8).toString());
    }//GEN-LAST:event_tableThoiKhoaBieuMouseClicked

    private void jPanel11ComponentShown(java.awt.event.ComponentEvent evt) {//GEN-FIRST:event_jPanel11ComponentShown
        // TODO add your handling code here:
        SetDataCombobox("Select TenKhoa from Khoa");
        cbbddkhoa.setModel(cbbmodel);
        SetDataCombobox("Select Distinct(a.TenKhoaHoc) "
                + "from KhoaHoc a,Khoa b "
                + "where a.KhoaID = b.KhoaID and b.TenKhoa = N'" + cbbddkhoa.getSelectedItem().toString() + "'");
        cbbddkhoahoc.setModel(cbbmodel);
        SetDataCombobox("Select a.TenKy from Ky a, KhoaHoc b,Khoa c "
                + "where a.KhoaHocID = b.KhoaHocID and b.KhoaID = c.KhoaID "
                + "and b.TenKhoaHoc = N'" + cbbddkhoahoc.getSelectedItem().toString() + "' "
                + "and c.TenKhoa = N'" + cbbddkhoa.getSelectedItem().toString() + "'");
        cbbddkyhoc.setModel(cbbmodel);
        SetDataCombobox("Select d.TenNhom from Ky a, KhoaHoc b,Khoa c, Nhom d "
                + "where a.KhoaHocID = b.KhoaHocID and b.KhoaID = c.KhoaID and d.KyID=a.KyID "
                + "and b.TenKhoaHoc = N'" + cbbddkhoahoc.getSelectedItem().toString() + "' "
                + "and c.TenKhoa = N'" + cbbddkhoa.getSelectedItem().toString() + "' "
                + "and a.TenKy = N'" + cbbddkyhoc.getSelectedItem().toString() + "'");
        cbbddnhom.setModel(cbbmodel);

        SetDataCombobox("Select distinct(a.TenMon) from ThoiKhoaBieu g,MonHoc a,Khoa b,Nhom c,Ky d,KhoaHoc e "
                + "where a.KhoaID=b.KhoaID and g.NhomID=c.NhomID and g.MonID=a.MonHocID and c.KyID=d.KyID "
                + "and d.KhoaHocID = e.KhoaHocID and e.KhoaID= b.KhoaID "
                + "and b.TenKhoa=N'" + cbbddkhoa.getSelectedItem().toString() + "' "
                + "and c.TenNhom=N'" + cbbddnhom.getSelectedItem().toString() + "' "
                + "and d.TenKy =N'" + cbbddkyhoc.getSelectedItem().toString() + "' "
                + "and e.TenKhoaHoc=N'" + cbbddkhoahoc.getSelectedItem().toString() + "'");
        cbbddmonhoc.setModel(cbbmodel);
        loadNgay();
        cbbddngay.setModel(cbbmodel);

        //load du lieu vao table
        String sql = "SELECT Distinct(g.SinhVienID),a.TenSinhVien,b.TenLop, g.TrangThai "
                + "from SinhVien a,Lop b,DiemDanh g "
                + "where a.LopID = b.LopID and a.SinhVienID=g.SinhVienID "
                + "and g.NgayDiemDanh=N'" + cbbddngay.getSelectedItem().toString() + "' "
                + "and g.TKBID in(Select e.TKBID from Nhom a,Ky b,KhoaHoc c,Khoa d, ThoiKhoaBieu e,MonHoc f  "
                + "where a.KyID=b.KyID and b.KhoaHocID=c.KhoaHocID and c.KhoaID = d.KhoaID and a.NhomID=e.NhomID and e.MonID=f.MonHocID "
                + "and f.TenMon=N'" + cbbddmonhoc.getSelectedItem().toString() + "' "
                + "and a.TenNhom=N'" + cbbddnhom.getSelectedItem().toString() + "' "
                + "and b.TenKy=N'" + cbbddkyhoc.getSelectedItem().toString() + "' "
                + "and c.TenKhoaHoc=N'" + cbbddkhoahoc.getSelectedItem().toString() + "' "
                + "and d.TenKhoa=N'" + cbbddkhoa.getSelectedItem().toString() + "')";
        SetDataCheckBoxDiemDanh(tableDiemDanh, sql);
//        try {
//            call = con.prepareCall("{call SelectDate(?,?,?,?)}");
//            call.setString(1, txtKHKhoaHocID.getText());
//            call.setString(2, txtKHTenKhoaHoc2.getText());
//            call.setString(3, cbbKHKhoa2.getSelectedItem().toString());
//            call.execute();
//            JOptionPane.showMessageDialog(rootPane, "C?p nh?t khóa h?c thành công");
//            SetData("Select a.KhoaHocID,a.TenKhoaHoc,b.TenKhoa from KhoaHoc a, Khoa b where a.KhoaID=b.KhoaID order by(a.KhoaHocID) DESC");
//            tableKhoaHoc.setModel(model);
//        } catch (Exception ex) {
//            JOptionPane.showMessageDialog(rootPane, "C?p nh?t khóa h?c không thành công");
//        }
    }//GEN-LAST:event_jPanel11ComponentShown

    private void cbbpnkhoaItemStateChanged(java.awt.event.ItemEvent evt) {//GEN-FIRST:event_cbbpnkhoaItemStateChanged
        // TODO add your handling code here:
        SetDataCombobox("Select Distinct(a.TenKhoaHoc) "
                + "from KhoaHoc a,Khoa b "
                + "where a.KhoaID = b.KhoaID and b.TenKhoa = N'" + cbbpnkhoa.getSelectedItem().toString() + "'");
        cbbpnkhoahoc.setModel(cbbmodel);
        SetDataCombobox("Select Distinct(a.TenKhoaHoc) "
                + "from KhoaHoc a,Khoa b "
                + "where a.KhoaID = b.KhoaID and b.TenKhoa = N'" + cbbpnkhoa.getSelectedItem().toString() + "'");
        cbbpnkhoahoc1.setModel(cbbmodel);
        SetDataCombobox(("Select a.TenLop from Lop a, KhoaHoc b,Khoa c where "
                + "a.KhoaHocID=b.KhoaHocID and b.KhoaID=c.KhoaID "
                + "and b.TenKhoaHoc=N'" + cbbpnkhoahoc.getSelectedItem().toString() + "' "
                + "and c.TenKhoa=N'" + cbbpnkhoa.getSelectedItem().toString() + "'"));
        cbbpnlop.setModel(cbbmodel);
        SetDataCombobox("Select a.TenKy from Ky a, KhoaHoc b,Khoa c "
                + "where a.KhoaHocID = b.KhoaHocID and b.KhoaID = c.KhoaID "
                + "and b.TenKhoaHoc=N'" + cbbpnkhoahoc1.getSelectedItem().toString() + "' "
                + "and c.TenKhoa = N'" + cbbpnkhoa.getSelectedItem().toString() + "'");
        cbbpnkyhoc.setModel(cbbmodel);
        SetDataCombobox("Select d.TenNhom from Ky a, KhoaHoc b,Khoa c, Nhom d "
                + "where a.KhoaHocID = b.KhoaHocID and b.KhoaID = c.KhoaID and d.KyID=a.KyID "
                + "and b.TenKhoaHoc=N'" + cbbpnkhoahoc1.getSelectedItem().toString() + "' "
                + "and c.TenKhoa = N'" + cbbpnkhoa.getSelectedItem().toString() + "' "
                + "and a.TenKy = N'" + cbbpnkyhoc.getSelectedItem().toString() + "' "
                + "and d.TrangThai='Enable'");
        cbbpnnhom.setModel(cbbmodel);

        SetDataCombobox("Select b.TenMon from ThoiKhoaBieu a,MonHoc b,Khoa c,Nhom d,Ky e,KhoaHoc f "
                + "where a.MonID=b.MonHocID and b.KhoaID=c.KhoaID and a.NhomID=d.NhomID "
                + "and d.KyID=e.KyID and e.KhoaHocID=f.KhoaHocID and f.KhoaID=c.KhoaID "
                + "and c.TenKhoa=N'" + cbbpnkhoa.getSelectedItem().toString() + "' "
                + "and d.TenNhom=N'" + cbbpnnhom.getSelectedItem().toString() + "' "
                + "and e.TenKy=N'" + cbbpnkyhoc.getSelectedItem().toString() + "' "
                + "and f.TenKhoaHoc=N'" + cbbpnkhoahoc1.getSelectedItem().toString() + "'");
        cbbpnmon.setModel(cbbmodel);

        //load du lieu vao tableSinhVienLop
        String sql = "Select a.SinhVienID,a.TenSinhVien from SinhVien a,Lop b,KhoaHoc c,Khoa d "
                + "where a.LopID=b.LopID and b.KhoaHocID = c.KhoaHocID and c.KhoaID=d.KhoaID "
                + "and b.TenLop=N'" + cbbpnlop.getSelectedItem().toString() + "' "
                + "and c.TenKhoaHoc=N'" + cbbpnkhoahoc.getSelectedItem().toString() + "' "
                + "and d.TenKhoa=N'" + cbbpnkhoa.getSelectedItem().toString() + "' "
                + "and a.SinhVienID not in(Select a.SinhVienID from PhanNhom a,ThoiKhoaBieu b,MonHoc c,Khoa d "
                + "where a.TKBID = b.TKBID and b.MonID=c.MonHocID and c.KhoaID= d.KhoaID "
                + "and c.TenMon=N'" + cbbpnmon.getSelectedItem().toString() + "' "
                + "and d.TenKhoa=N'" + cbbpnkhoa.getSelectedItem().toString() + "' "
                + "and b.NhomID in(Select a.NhomID from Nhom a,Ky b,KhoaHoc c,Khoa d "
                + "where a.KyID=b.KyID and b.KhoaHocID = c.KhoaHocID and c.KhoaID=d.KhoaID "
                + "and a.TenNhom=N'" + cbbpnnhom.getSelectedItem().toString() + "' "
                + "and b.TenKy =N'" + cbbpnkyhoc.getSelectedItem().toString() + "' "
                + "and c.TenKhoaHoc=N'" + cbbpnkhoahoc1.getSelectedItem().toString() + "' "
                + "and d.TenKhoa=N'" + cbbpnkhoa.getSelectedItem().toString() + "'))";
        SetDataCheckBox1(tableSinhVienLop, sql);

        //load du lieu vao bang tableSinhVienNhom
        sql = "Select f.SinhVienID,f.TenSinhVien from PhanNhom a,ThoiKhoaBieu b,MonHoc c,Khoa d,SinhVien f "
                + "where f.SinhVienID=a.SinhVienID and a.TKBID = b.TKBID and b.MonID=c.MonHocID and c.KhoaID= d.KhoaID "
                + "and c.TenMon=N'" + cbbpnmon.getSelectedItem().toString() + "' "
                + "and d.TenKhoa=N'" + cbbpnkhoa.getSelectedItem().toString() + "' "
                + "and b.NhomID in(Select a.NhomID from Nhom a,Ky b,KhoaHoc c,Khoa d "
                + "where a.KyID=b.KyID and b.KhoaHocID = c.KhoaHocID and c.KhoaID=d.KhoaID "
                + "and a.TenNhom=N'" + cbbpnnhom.getSelectedItem().toString() + "' "
                + "and b.TenKy =N'" + cbbpnkyhoc.getSelectedItem().toString() + "' "
                + "and c.TenKhoaHoc=N'" + cbbpnkhoahoc1.getSelectedItem().toString() + "' "
                + "and d.TenKhoa=N'" + cbbpnkhoa.getSelectedItem().toString() + "')";
        SetDataCheckBox2(tableSinhVienNhom, sql);
    }//GEN-LAST:event_cbbpnkhoaItemStateChanged

    private void cbbpnkhoahocItemStateChanged(java.awt.event.ItemEvent evt) {//GEN-FIRST:event_cbbpnkhoahocItemStateChanged
        // TODO add your handling code here:
        SetDataCombobox(("Select a.TenLop from Lop a, KhoaHoc b,Khoa c where "
                + "a.KhoaHocID=b.KhoaHocID and b.KhoaID=c.KhoaID "
                + "and b.TenKhoaHoc=N'" + cbbpnkhoahoc.getSelectedItem().toString() + "' "
                + "and c.TenKhoa=N'" + cbbpnkhoa.getSelectedItem().toString() + "'"));
        cbbpnlop.setModel(cbbmodel);

        //load du lieu vao tableSinhVienLop
        String sql = "Select a.SinhVienID,a.TenSinhVien from SinhVien a,Lop b,KhoaHoc c,Khoa d "
                + "where a.LopID=b.LopID and b.KhoaHocID = c.KhoaHocID and c.KhoaID=d.KhoaID "
                + "and b.TenLop=N'" + cbbpnlop.getSelectedItem().toString() + "' "
                + "and c.TenKhoaHoc=N'" + cbbpnkhoahoc.getSelectedItem().toString() + "' "
                + "and d.TenKhoa=N'" + cbbpnkhoa.getSelectedItem().toString() + "' "
                + "and a.SinhVienID not in(Select a.SinhVienID from PhanNhom a,ThoiKhoaBieu b,MonHoc c,Khoa d "
                + "where a.TKBID = b.TKBID and b.MonID=c.MonHocID and c.KhoaID= d.KhoaID "
                + "and c.TenMon=N'" + cbbpnmon.getSelectedItem().toString() + "' "
                + "and d.TenKhoa=N'" + cbbpnkhoa.getSelectedItem().toString() + "' "
                + "and b.NhomID in(Select a.NhomID from Nhom a,Ky b,KhoaHoc c,Khoa d "
                + "where a.KyID=b.KyID and b.KhoaHocID = c.KhoaHocID and c.KhoaID=d.KhoaID "
                + "and a.TenNhom=N'" + cbbpnnhom.getSelectedItem().toString() + "' "
                + "and b.TenKy =N'" + cbbpnkyhoc.getSelectedItem().toString() + "' "
                + "and c.TenKhoaHoc=N'" + cbbpnkhoahoc1.getSelectedItem().toString() + "' "
                + "and d.TenKhoa=N'" + cbbpnkhoa.getSelectedItem().toString() + "'))";
        SetDataCheckBox1(tableSinhVienLop, sql);

    }//GEN-LAST:event_cbbpnkhoahocItemStateChanged

    private void cbbpnmonItemStateChanged(java.awt.event.ItemEvent evt) {//GEN-FIRST:event_cbbpnmonItemStateChanged
        // TODO add your handling code here:
        //load du lieu vao tableSinhVienLop
        String sql = "Select a.SinhVienID,a.TenSinhVien from SinhVien a,Lop b,KhoaHoc c,Khoa d "
                + "where a.LopID=b.LopID and b.KhoaHocID = c.KhoaHocID and c.KhoaID=d.KhoaID "
                + "and b.TenLop=N'" + cbbpnlop.getSelectedItem().toString() + "' "
                + "and c.TenKhoaHoc=N'" + cbbpnkhoahoc.getSelectedItem().toString() + "' "
                + "and d.TenKhoa=N'" + cbbpnkhoa.getSelectedItem().toString() + "' "
                + "and a.SinhVienID not in(Select a.SinhVienID from PhanNhom a,ThoiKhoaBieu b,MonHoc c,Khoa d "
                + "where a.TKBID = b.TKBID and b.MonID=c.MonHocID and c.KhoaID= d.KhoaID "
                + "and c.TenMon=N'" + cbbpnmon.getSelectedItem().toString() + "' "
                + "and d.TenKhoa=N'" + cbbpnkhoa.getSelectedItem().toString() + "' "
                + "and b.NhomID in(Select a.NhomID from Nhom a,Ky b,KhoaHoc c,Khoa d "
                + "where a.KyID=b.KyID and b.KhoaHocID = c.KhoaHocID and c.KhoaID=d.KhoaID "
                + "and a.TenNhom=N'" + cbbpnnhom.getSelectedItem().toString() + "' "
                + "and b.TenKy =N'" + cbbpnkyhoc.getSelectedItem().toString() + "' "
                + "and c.TenKhoaHoc=N'" + cbbpnkhoahoc1.getSelectedItem().toString() + "' "
                + "and d.TenKhoa=N'" + cbbpnkhoa.getSelectedItem().toString() + "'))";
        SetDataCheckBox1(tableSinhVienLop, sql);

        //load du lieu vao bang tableSinhVienNhom
        sql = "Select f.SinhVienID,f.TenSinhVien from PhanNhom a,ThoiKhoaBieu b,MonHoc c,Khoa d,SinhVien f "
                + "where f.SinhVienID=a.SinhVienID and a.TKBID = b.TKBID and b.MonID=c.MonHocID and c.KhoaID= d.KhoaID "
                + "and c.TenMon=N'" + cbbpnmon.getSelectedItem().toString() + "' "
                + "and d.TenKhoa=N'" + cbbpnkhoa.getSelectedItem().toString() + "' "
                + "and b.NhomID in(Select a.NhomID from Nhom a,Ky b,KhoaHoc c,Khoa d "
                + "where a.KyID=b.KyID and b.KhoaHocID = c.KhoaHocID and c.KhoaID=d.KhoaID "
                + "and a.TenNhom=N'" + cbbpnnhom.getSelectedItem().toString() + "' "
                + "and b.TenKy =N'" + cbbpnkyhoc.getSelectedItem().toString() + "' "
                + "and c.TenKhoaHoc=N'" + cbbpnkhoahoc1.getSelectedItem().toString() + "' "
                + "and d.TenKhoa=N'" + cbbpnkhoa.getSelectedItem().toString() + "')";
        SetDataCheckBox2(tableSinhVienNhom, sql);
    }//GEN-LAST:event_cbbpnmonItemStateChanged

    private void cbbpnlopItemStateChanged(java.awt.event.ItemEvent evt) {//GEN-FIRST:event_cbbpnlopItemStateChanged
        // TODO add your handling code here:

        //load du lieu vao tableSinhVienLop
        String sql = "Select a.SinhVienID,a.TenSinhVien from SinhVien a,Lop b,KhoaHoc c,Khoa d "
                + "where a.LopID=b.LopID and b.KhoaHocID = c.KhoaHocID and c.KhoaID=d.KhoaID "
                + "and b.TenLop=N'" + cbbpnlop.getSelectedItem().toString() + "' "
                + "and c.TenKhoaHoc=N'" + cbbpnkhoahoc.getSelectedItem().toString() + "' "
                + "and d.TenKhoa=N'" + cbbpnkhoa.getSelectedItem().toString() + "' "
                + "and a.SinhVienID not in(Select a.SinhVienID from PhanNhom a,ThoiKhoaBieu b,MonHoc c,Khoa d "
                + "where a.TKBID = b.TKBID and b.MonID=c.MonHocID and c.KhoaID= d.KhoaID "
                + "and c.TenMon=N'" + cbbpnmon.getSelectedItem().toString() + "' "
                + "and d.TenKhoa=N'" + cbbpnkhoa.getSelectedItem().toString() + "' "
                + "and b.NhomID in(Select a.NhomID from Nhom a,Ky b,KhoaHoc c,Khoa d "
                + "where a.KyID=b.KyID and b.KhoaHocID = c.KhoaHocID and c.KhoaID=d.KhoaID "
                + "and a.TenNhom=N'" + cbbpnnhom.getSelectedItem().toString() + "' "
                + "and b.TenKy =N'" + cbbpnkyhoc.getSelectedItem().toString() + "' "
                + "and c.TenKhoaHoc=N'" + cbbpnkhoahoc1.getSelectedItem().toString() + "' "
                + "and d.TenKhoa=N'" + cbbpnkhoa.getSelectedItem().toString() + "'))";
        SetDataCheckBox1(tableSinhVienLop, sql);
    }//GEN-LAST:event_cbbpnlopItemStateChanged

    private void jPanel31ComponentShown(java.awt.event.ComponentEvent evt) {//GEN-FIRST:event_jPanel31ComponentShown
        // TODO add your handling code here:
        SetDataCombobox("Select TenKhoa from Khoa");
        cbbpnkhoa.setModel(cbbmodel);
        SetDataCombobox("Select Distinct(a.TenKhoaHoc) "
                + "from KhoaHoc a,Khoa b "
                + "where a.KhoaID = b.KhoaID and b.TenKhoa = N'" + cbbpnkhoa.getSelectedItem().toString() + "'");
        cbbpnkhoahoc.setModel(cbbmodel);
        SetDataCombobox("Select Distinct(a.TenKhoaHoc) "
                + "from KhoaHoc a,Khoa b "
                + "where a.KhoaID = b.KhoaID and b.TenKhoa = N'" + cbbpnkhoa.getSelectedItem().toString() + "'");
        cbbpnkhoahoc1.setModel(cbbmodel);
        SetDataCombobox(("Select a.TenLop from Lop a, KhoaHoc b,Khoa c where "
                + "a.KhoaHocID=b.KhoaHocID and b.KhoaID=c.KhoaID "
                + "and b.TenKhoaHoc=N'" + cbbpnkhoahoc.getSelectedItem().toString() + "' "
                + "and c.TenKhoa=N'" + cbbpnkhoa.getSelectedItem().toString() + "'"));
        cbbpnlop.setModel(cbbmodel);
        SetDataCombobox("Select a.TenKy from Ky a, KhoaHoc b,Khoa c "
                + "where a.KhoaHocID = b.KhoaHocID and b.KhoaID = c.KhoaID "
                + "and b.TenKhoaHoc=N'" + cbbpnkhoahoc1.getSelectedItem().toString() + "' "
                + "and c.TenKhoa = N'" + cbbpnkhoa.getSelectedItem().toString() + "'");
        cbbpnkyhoc.setModel(cbbmodel);
        SetDataCombobox("Select d.TenNhom from Ky a, KhoaHoc b,Khoa c, Nhom d "
                + "where a.KhoaHocID = b.KhoaHocID and b.KhoaID = c.KhoaID and d.KyID=a.KyID "
                + "and b.TenKhoaHoc=N'" + cbbpnkhoahoc1.getSelectedItem().toString() + "' "
                + "and c.TenKhoa = N'" + cbbpnkhoa.getSelectedItem().toString() + "' "
                + "and a.TenKy = N'" + cbbpnkyhoc.getSelectedItem().toString() + "' "
                + "and d.TrangThai='Enable'");
        cbbpnnhom.setModel(cbbmodel);
        SetDataCombobox("Select b.TenMon from ThoiKhoaBieu a,MonHoc b,Khoa c,Nhom d,Ky e,KhoaHoc f "
                + "where a.MonID=b.MonHocID and b.KhoaID=c.KhoaID and a.NhomID=d.NhomID "
                + "and d.KyID=e.KyID and e.KhoaHocID=f.KhoaHocID and f.KhoaID=c.KhoaID "
                + "and c.TenKhoa=N'" + cbbpnkhoa.getSelectedItem().toString() + "' "
                + "and d.TenNhom=N'" + cbbpnnhom.getSelectedItem().toString() + "' "
                + "and e.TenKy=N'" + cbbpnkyhoc.getSelectedItem().toString() + "' "
                + "and f.TenKhoaHoc=N'" + cbbpnkhoahoc1.getSelectedItem().toString() + "'");
        cbbpnmon.setModel(cbbmodel);

        //load du lieu vao tableSinhVienLop
        String sql = "Select a.SinhVienID,a.TenSinhVien from SinhVien a,Lop b,KhoaHoc c,Khoa d "
                + "where a.LopID=b.LopID and b.KhoaHocID = c.KhoaHocID and c.KhoaID=d.KhoaID "
                + "and b.TenLop=N'" + cbbpnlop.getSelectedItem().toString() + "' "
                + "and c.TenKhoaHoc=N'" + cbbpnkhoahoc.getSelectedItem().toString() + "' "
                + "and d.TenKhoa=N'" + cbbpnkhoa.getSelectedItem().toString() + "' "
                + "and a.SinhVienID not in(Select a.SinhVienID from PhanNhom a,ThoiKhoaBieu b,MonHoc c,Khoa d "
                + "where a.TKBID = b.TKBID and b.MonID=c.MonHocID and c.KhoaID= d.KhoaID "
                + "and c.TenMon=N'" + cbbpnmon.getSelectedItem().toString() + "' "
                + "and d.TenKhoa=N'" + cbbpnkhoa.getSelectedItem().toString() + "' "
                + "and b.NhomID in(Select a.NhomID from Nhom a,Ky b,KhoaHoc c,Khoa d "
                + "where a.KyID=b.KyID and b.KhoaHocID = c.KhoaHocID and c.KhoaID=d.KhoaID "
                + "and a.TenNhom=N'" + cbbpnnhom.getSelectedItem().toString() + "' "
                + "and b.TenKy =N'" + cbbpnkyhoc.getSelectedItem().toString() + "' "
                + "and c.TenKhoaHoc=N'" + cbbpnkhoahoc1.getSelectedItem().toString() + "' "
                + "and d.TenKhoa=N'" + cbbpnkhoa.getSelectedItem().toString() + "'))";
        SetDataCheckBox1(tableSinhVienLop, sql);

        //load du lieu vao bang tableSinhVienNhom
        sql = "Select f.SinhVienID,f.TenSinhVien from PhanNhom a,ThoiKhoaBieu b,MonHoc c,Khoa d,SinhVien f "
                + "where f.SinhVienID=a.SinhVienID and a.TKBID = b.TKBID and b.MonID=c.MonHocID and c.KhoaID= d.KhoaID "
                + "and c.TenMon=N'" + cbbpnmon.getSelectedItem().toString() + "' "
                + "and d.TenKhoa=N'" + cbbpnkhoa.getSelectedItem().toString() + "' "
                + "and b.NhomID in(Select a.NhomID from Nhom a,Ky b,KhoaHoc c,Khoa d "
                + "where a.KyID=b.KyID and b.KhoaHocID = c.KhoaHocID and c.KhoaID=d.KhoaID "
                + "and a.TenNhom=N'" + cbbpnnhom.getSelectedItem().toString() + "' "
                + "and b.TenKy =N'" + cbbpnkyhoc.getSelectedItem().toString() + "' "
                + "and c.TenKhoaHoc=N'" + cbbpnkhoahoc1.getSelectedItem().toString() + "' "
                + "and d.TenKhoa=N'" + cbbpnkhoa.getSelectedItem().toString() + "')";
        SetDataCheckBox2(tableSinhVienNhom, sql);
    }//GEN-LAST:event_jPanel31ComponentShown

    private void cbbpnkhoahoc1ItemStateChanged(java.awt.event.ItemEvent evt) {//GEN-FIRST:event_cbbpnkhoahoc1ItemStateChanged
        // TODO add your handling code here:
        SetDataCombobox("Select a.TenKy from Ky a, KhoaHoc b,Khoa c "
                + "where a.KhoaHocID = b.KhoaHocID and b.KhoaID = c.KhoaID "
                + "and b.TenKhoaHoc=N'" + cbbpnkhoahoc1.getSelectedItem().toString() + "' "
                + "and c.TenKhoa = N'" + cbbpnkhoa.getSelectedItem().toString() + "'");
        cbbpnkyhoc.setModel(cbbmodel);
        SetDataCombobox("Select d.TenNhom from Ky a, KhoaHoc b,Khoa c, Nhom d "
                + "where a.KhoaHocID = b.KhoaHocID and b.KhoaID = c.KhoaID and d.KyID=a.KyID "
                + "and b.TenKhoaHoc=N'" + cbbpnkhoahoc1.getSelectedItem().toString() + "' "
                + "and c.TenKhoa = N'" + cbbpnkhoa.getSelectedItem().toString() + "' "
                + "and a.TenKy = N'" + cbbpnkyhoc.getSelectedItem().toString() + "' "
                + "and d.TrangThai='Enable'");
        cbbpnnhom.setModel(cbbmodel);
        SetDataCombobox("Select b.TenMon from ThoiKhoaBieu a,MonHoc b,Khoa c,Nhom d,Ky e,KhoaHoc f "
                + "where a.MonID=b.MonHocID and b.KhoaID=c.KhoaID and a.NhomID=d.NhomID "
                + "and d.KyID=e.KyID and e.KhoaHocID=f.KhoaHocID and f.KhoaID=c.KhoaID "
                + "and c.TenKhoa=N'" + cbbpnkhoa.getSelectedItem().toString() + "' "
                + "and d.TenNhom=N'" + cbbpnnhom.getSelectedItem().toString() + "' "
                + "and e.TenKy=N'" + cbbpnkyhoc.getSelectedItem().toString() + "' "
                + "and f.TenKhoaHoc=N'" + cbbpnkhoahoc1.getSelectedItem().toString() + "'");
        cbbpnmon.setModel(cbbmodel);

        //load du lieu vao tableSinhVienLop
        String sql = "Select a.SinhVienID,a.TenSinhVien from SinhVien a,Lop b,KhoaHoc c,Khoa d "
                + "where a.LopID=b.LopID and b.KhoaHocID = c.KhoaHocID and c.KhoaID=d.KhoaID "
                + "and b.TenLop=N'" + cbbpnlop.getSelectedItem().toString() + "' "
                + "and c.TenKhoaHoc=N'" + cbbpnkhoahoc.getSelectedItem().toString() + "' "
                + "and d.TenKhoa=N'" + cbbpnkhoa.getSelectedItem().toString() + "' "
                + "and a.SinhVienID not in(Select a.SinhVienID from PhanNhom a,ThoiKhoaBieu b,MonHoc c,Khoa d "
                + "where a.TKBID = b.TKBID and b.MonID=c.MonHocID and c.KhoaID= d.KhoaID "
                + "and c.TenMon=N'" + cbbpnmon.getSelectedItem().toString() + "' "
                + "and d.TenKhoa=N'" + cbbpnkhoa.getSelectedItem().toString() + "' "
                + "and b.NhomID in(Select a.NhomID from Nhom a,Ky b,KhoaHoc c,Khoa d "
                + "where a.KyID=b.KyID and b.KhoaHocID = c.KhoaHocID and c.KhoaID=d.KhoaID "
                + "and a.TenNhom=N'" + cbbpnnhom.getSelectedItem().toString() + "' "
                + "and b.TenKy =N'" + cbbpnkyhoc.getSelectedItem().toString() + "' "
                + "and c.TenKhoaHoc=N'" + cbbpnkhoahoc1.getSelectedItem().toString() + "' "
                + "and d.TenKhoa=N'" + cbbpnkhoa.getSelectedItem().toString() + "'))";
        SetDataCheckBox1(tableSinhVienLop, sql);

        //load du lieu vao bang tableSinhVienNhom
        sql = "Select f.SinhVienID,f.TenSinhVien from PhanNhom a,ThoiKhoaBieu b,MonHoc c,Khoa d,SinhVien f "
                + "where f.SinhVienID=a.SinhVienID and a.TKBID = b.TKBID and b.MonID=c.MonHocID and c.KhoaID= d.KhoaID "
                + "and c.TenMon=N'" + cbbpnmon.getSelectedItem().toString() + "' "
                + "and d.TenKhoa=N'" + cbbpnkhoa.getSelectedItem().toString() + "' "
                + "and b.NhomID in(Select a.NhomID from Nhom a,Ky b,KhoaHoc c,Khoa d "
                + "where a.KyID=b.KyID and b.KhoaHocID = c.KhoaHocID and c.KhoaID=d.KhoaID "
                + "and a.TenNhom=N'" + cbbpnnhom.getSelectedItem().toString() + "' "
                + "and b.TenKy =N'" + cbbpnkyhoc.getSelectedItem().toString() + "' "
                + "and c.TenKhoaHoc=N'" + cbbpnkhoahoc1.getSelectedItem().toString() + "' "
                + "and d.TenKhoa=N'" + cbbpnkhoa.getSelectedItem().toString() + "')";
        SetDataCheckBox2(tableSinhVienNhom, sql);
    }//GEN-LAST:event_cbbpnkhoahoc1ItemStateChanged

    private void cbbpnnhomItemStateChanged(java.awt.event.ItemEvent evt) {//GEN-FIRST:event_cbbpnnhomItemStateChanged
        // TODO add your handling code here:
        SetDataCombobox("Select b.TenMon from ThoiKhoaBieu a,MonHoc b,Khoa c,Nhom d,Ky e,KhoaHoc f "
                + "where a.MonID=b.MonHocID and b.KhoaID=c.KhoaID and a.NhomID=d.NhomID "
                + "and d.KyID=e.KyID and e.KhoaHocID=f.KhoaHocID and f.KhoaID=c.KhoaID "
                + "and c.TenKhoa=N'" + cbbpnkhoa.getSelectedItem().toString() + "' "
                + "and d.TenNhom=N'" + cbbpnnhom.getSelectedItem().toString() + "' "
                + "and e.TenKy=N'" + cbbpnkyhoc.getSelectedItem().toString() + "' "
                + "and f.TenKhoaHoc=N'" + cbbpnkhoahoc1.getSelectedItem().toString() + "'");
        cbbpnmon.setModel(cbbmodel);

        //load du lieu vao tableSinhVienLop
        String sql = "Select a.SinhVienID,a.TenSinhVien from SinhVien a,Lop b,KhoaHoc c,Khoa d "
                + "where a.LopID=b.LopID and b.KhoaHocID = c.KhoaHocID and c.KhoaID=d.KhoaID "
                + "and b.TenLop=N'" + cbbpnlop.getSelectedItem().toString() + "' "
                + "and c.TenKhoaHoc=N'" + cbbpnkhoahoc.getSelectedItem().toString() + "' "
                + "and d.TenKhoa=N'" + cbbpnkhoa.getSelectedItem().toString() + "' "
                + "and a.SinhVienID not in(Select a.SinhVienID from PhanNhom a,ThoiKhoaBieu b,MonHoc c,Khoa d "
                + "where a.TKBID = b.TKBID and b.MonID=c.MonHocID and c.KhoaID= d.KhoaID "
                + "and c.TenMon=N'" + cbbpnmon.getSelectedItem().toString() + "' "
                + "and d.TenKhoa=N'" + cbbpnkhoa.getSelectedItem().toString() + "' "
                + "and b.NhomID in(Select a.NhomID from Nhom a,Ky b,KhoaHoc c,Khoa d "
                + "where a.KyID=b.KyID and b.KhoaHocID = c.KhoaHocID and c.KhoaID=d.KhoaID "
                + "and a.TenNhom=N'" + cbbpnnhom.getSelectedItem().toString() + "' "
                + "and b.TenKy =N'" + cbbpnkyhoc.getSelectedItem().toString() + "' "
                + "and c.TenKhoaHoc=N'" + cbbpnkhoahoc1.getSelectedItem().toString() + "' "
                + "and d.TenKhoa=N'" + cbbpnkhoa.getSelectedItem().toString() + "'))";
        SetDataCheckBox1(tableSinhVienLop, sql);

        //load du lieu vao bang tableSinhVienNhom
        sql = "Select f.SinhVienID,f.TenSinhVien from PhanNhom a,ThoiKhoaBieu b,MonHoc c,Khoa d,SinhVien f "
                + "where f.SinhVienID=a.SinhVienID and a.TKBID = b.TKBID and b.MonID=c.MonHocID and c.KhoaID= d.KhoaID "
                + "and c.TenMon=N'" + cbbpnmon.getSelectedItem().toString() + "' "
                + "and d.TenKhoa=N'" + cbbpnkhoa.getSelectedItem().toString() + "' "
                + "and b.NhomID in(Select a.NhomID from Nhom a,Ky b,KhoaHoc c,Khoa d "
                + "where a.KyID=b.KyID and b.KhoaHocID = c.KhoaHocID and c.KhoaID=d.KhoaID "
                + "and a.TenNhom=N'" + cbbpnnhom.getSelectedItem().toString() + "' "
                + "and b.TenKy =N'" + cbbpnkyhoc.getSelectedItem().toString() + "' "
                + "and c.TenKhoaHoc=N'" + cbbpnkhoahoc1.getSelectedItem().toString() + "' "
                + "and d.TenKhoa=N'" + cbbpnkhoa.getSelectedItem().toString() + "')";
        SetDataCheckBox2(tableSinhVienNhom, sql);
    }//GEN-LAST:event_cbbpnnhomItemStateChanged

    private void btnpnthemActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnpnthemActionPerformed
        // TODO add your handling code here:
        //lay du lieu duoc select tu bang tableSinhVienLop
        Vector v = mymodel1.getDataSelect();
        try {
            for (int i = 0; i < v.size(); i++) {
                call = con.prepareCall("{call ThemPhanNhom(?,?,?,?,?,?)}");
                call.setString(1, cbbpnkhoa.getSelectedItem().toString());
                call.setString(2, cbbpnkhoahoc1.getSelectedItem().toString());
                call.setString(3, cbbpnkyhoc.getSelectedItem().toString());
                call.setString(4, cbbpnnhom.getSelectedItem().toString());
                call.setString(5, cbbpnmon.getSelectedItem().toString());
                call.setString(6, v.get(i).toString());
                call.execute();
            }
            JOptionPane.showMessageDialog(rootPane, "Thêm vào nhóm thành công");
            //load du lieu vao tableSinhVienLop
            String sql = "Select a.SinhVienID,a.TenSinhVien from SinhVien a,Lop b,KhoaHoc c,Khoa d "
                    + "where a.LopID=b.LopID and b.KhoaHocID = c.KhoaHocID and c.KhoaID=d.KhoaID "
                    + "and b.TenLop=N'" + cbbpnlop.getSelectedItem().toString() + "' "
                    + "and c.TenKhoaHoc=N'" + cbbpnkhoahoc.getSelectedItem().toString() + "' "
                    + "and d.TenKhoa=N'" + cbbpnkhoa.getSelectedItem().toString() + "' "
                    + "and a.SinhVienID not in(Select a.SinhVienID from PhanNhom a,ThoiKhoaBieu b,MonHoc c,Khoa d "
                    + "where a.TKBID = b.TKBID and b.MonID=c.MonHocID and c.KhoaID= d.KhoaID "
                    + "and c.TenMon=N'" + cbbpnmon.getSelectedItem().toString() + "' "
                    + "and d.TenKhoa=N'" + cbbpnkhoa.getSelectedItem().toString() + "' "
                    + "and b.NhomID in(Select a.NhomID from Nhom a,Ky b,KhoaHoc c,Khoa d "
                    + "where a.KyID=b.KyID and b.KhoaHocID = c.KhoaHocID and c.KhoaID=d.KhoaID "
                    + "and a.TenNhom=N'" + cbbpnnhom.getSelectedItem().toString() + "' "
                    + "and b.TenKy =N'" + cbbpnkyhoc.getSelectedItem().toString() + "' "
                    + "and c.TenKhoaHoc=N'" + cbbpnkhoahoc1.getSelectedItem().toString() + "' "
                    + "and d.TenKhoa=N'" + cbbpnkhoa.getSelectedItem().toString() + "'))";
            SetDataCheckBox1(tableSinhVienLop, sql);

            //load du lieu vao bang tableSinhVienNhom
            sql = "Select f.SinhVienID,f.TenSinhVien from PhanNhom a,ThoiKhoaBieu b,MonHoc c,Khoa d,SinhVien f "
                    + "where f.SinhVienID=a.SinhVienID and a.TKBID = b.TKBID and b.MonID=c.MonHocID and c.KhoaID= d.KhoaID "
                    + "and c.TenMon=N'" + cbbpnmon.getSelectedItem().toString() + "' "
                    + "and d.TenKhoa=N'" + cbbpnkhoa.getSelectedItem().toString() + "' "
                    + "and b.NhomID in(Select a.NhomID from Nhom a,Ky b,KhoaHoc c,Khoa d "
                    + "where a.KyID=b.KyID and b.KhoaHocID = c.KhoaHocID and c.KhoaID=d.KhoaID "
                    + "and a.TenNhom=N'" + cbbpnnhom.getSelectedItem().toString() + "' "
                    + "and b.TenKy =N'" + cbbpnkyhoc.getSelectedItem().toString() + "' "
                    + "and c.TenKhoaHoc=N'" + cbbpnkhoahoc1.getSelectedItem().toString() + "' "
                    + "and d.TenKhoa=N'" + cbbpnkhoa.getSelectedItem().toString() + "')";
            SetDataCheckBox2(tableSinhVienNhom, sql);
        } catch (Exception ex) {
            JOptionPane.showMessageDialog(rootPane, "Thêm vào nhóm không thành công");
            System.out.println(ex.getMessage());
        }
    }//GEN-LAST:event_btnpnthemActionPerformed

    private void btnpnxoaActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnpnxoaActionPerformed
        // TODO add your handling code here:
        Vector v = mymodel2.getDataSelect();
        try {
            for (int i = 0; i < v.size(); i++) {
                call = con.prepareCall("{call SuaPhanNhom(?,?,?,?,?,?)}");
                call.setString(1, cbbpnkhoa.getSelectedItem().toString());
                call.setString(2, cbbpnkhoahoc1.getSelectedItem().toString());
                call.setString(3, cbbpnkyhoc.getSelectedItem().toString());
                call.setString(4, cbbpnnhom.getSelectedItem().toString());
                call.setString(5, cbbpnmon.getSelectedItem().toString());
                call.setString(6, v.get(i).toString());
                call.execute();
            }
            JOptionPane.showMessageDialog(rootPane, "Xóa khỏi nhóm thành công");
            //load du lieu vao tableSinhVienLop
            String sql = "Select a.SinhVienID,a.TenSinhVien from SinhVien a,Lop b,KhoaHoc c,Khoa d "
                    + "where a.LopID=b.LopID and b.KhoaHocID = c.KhoaHocID and c.KhoaID=d.KhoaID "
                    + "and b.TenLop=N'" + cbbpnlop.getSelectedItem().toString() + "' "
                    + "and c.TenKhoaHoc=N'" + cbbpnkhoahoc.getSelectedItem().toString() + "' "
                    + "and d.TenKhoa=N'" + cbbpnkhoa.getSelectedItem().toString() + "' "
                    + "and a.SinhVienID not in(Select a.SinhVienID from PhanNhom a,ThoiKhoaBieu b,MonHoc c,Khoa d "
                    + "where a.TKBID = b.TKBID and b.MonID=c.MonHocID and c.KhoaID= d.KhoaID "
                    + "and c.TenMon=N'" + cbbpnmon.getSelectedItem().toString() + "' "
                    + "and d.TenKhoa=N'" + cbbpnkhoa.getSelectedItem().toString() + "' "
                    + "and b.NhomID in(Select a.NhomID from Nhom a,Ky b,KhoaHoc c,Khoa d "
                    + "where a.KyID=b.KyID and b.KhoaHocID = c.KhoaHocID and c.KhoaID=d.KhoaID "
                    + "and a.TenNhom=N'" + cbbpnnhom.getSelectedItem().toString() + "' "
                    + "and b.TenKy =N'" + cbbpnkyhoc.getSelectedItem().toString() + "' "
                    + "and c.TenKhoaHoc=N'" + cbbpnkhoahoc1.getSelectedItem().toString() + "' "
                    + "and d.TenKhoa=N'" + cbbpnkhoa.getSelectedItem().toString() + "'))";
            SetDataCheckBox1(tableSinhVienLop, sql);

            //load du lieu vao bang tableSinhVienNhom
            sql = "Select f.SinhVienID,f.TenSinhVien from PhanNhom a,ThoiKhoaBieu b,MonHoc c,Khoa d,SinhVien f "
                    + "where f.SinhVienID=a.SinhVienID and a.TKBID = b.TKBID and b.MonID=c.MonHocID and c.KhoaID= d.KhoaID "
                    + "and c.TenMon=N'" + cbbpnmon.getSelectedItem().toString() + "' "
                    + "and d.TenKhoa=N'" + cbbpnkhoa.getSelectedItem().toString() + "' "
                    + "and b.NhomID in(Select a.NhomID from Nhom a,Ky b,KhoaHoc c,Khoa d "
                    + "where a.KyID=b.KyID and b.KhoaHocID = c.KhoaHocID and c.KhoaID=d.KhoaID "
                    + "and a.TenNhom=N'" + cbbpnnhom.getSelectedItem().toString() + "' "
                    + "and b.TenKy =N'" + cbbpnkyhoc.getSelectedItem().toString() + "' "
                    + "and c.TenKhoaHoc=N'" + cbbpnkhoahoc1.getSelectedItem().toString() + "' "
                    + "and d.TenKhoa=N'" + cbbpnkhoa.getSelectedItem().toString() + "')";
            SetDataCheckBox2(tableSinhVienNhom, sql);
        } catch (Exception ex) {
            JOptionPane.showMessageDialog(rootPane, "Xóa khỏi nhóm không thành công");
        }
    }//GEN-LAST:event_btnpnxoaActionPerformed

    private void cbbddkhoaItemStateChanged(java.awt.event.ItemEvent evt) {//GEN-FIRST:event_cbbddkhoaItemStateChanged
        // TODO add your handling code here:
        SetDataCombobox("Select Distinct(a.TenKhoaHoc) "
                + "from KhoaHoc a,Khoa b "
                + "where a.KhoaID = b.KhoaID and b.TenKhoa = N'" + cbbddkhoa.getSelectedItem().toString() + "'");
        cbbddkhoahoc.setModel(cbbmodel);
        SetDataCombobox("Select a.TenKy from Ky a, KhoaHoc b,Khoa c "
                + "where a.KhoaHocID = b.KhoaHocID and b.KhoaID = c.KhoaID "
                + "and b.TenKhoaHoc = N'" + cbbddkhoahoc.getSelectedItem().toString() + "' "
                + "and c.TenKhoa = N'" + cbbddkhoa.getSelectedItem().toString() + "'");
        cbbddkyhoc.setModel(cbbmodel);
        SetDataCombobox("Select d.TenNhom from Ky a, KhoaHoc b,Khoa c, Nhom d "
                + "where a.KhoaHocID = b.KhoaHocID and b.KhoaID = c.KhoaID and d.KyID=a.KyID "
                + "and b.TenKhoaHoc = N'" + cbbddkhoahoc.getSelectedItem().toString() + "' "
                + "and c.TenKhoa = N'" + cbbddkhoa.getSelectedItem().toString() + "' "
                + "and a.TenKy = N'" + cbbddkyhoc.getSelectedItem().toString() + "'");
        cbbddnhom.setModel(cbbmodel);

        SetDataCombobox("Select distinct(a.TenMon) from ThoiKhoaBieu g,MonHoc a,Khoa b,Nhom c,Ky d,KhoaHoc e "
                + "where a.KhoaID=b.KhoaID and g.NhomID=c.NhomID and g.MonID=a.MonHocID and c.KyID=d.KyID "
                + "and d.KhoaHocID = e.KhoaHocID and e.KhoaID= b.KhoaID "
                + "and b.TenKhoa=N'" + cbbddkhoa.getSelectedItem().toString() + "' "
                + "and c.TenNhom=N'" + cbbddnhom.getSelectedItem().toString() + "' "
                + "and d.TenKy =N'" + cbbddkyhoc.getSelectedItem().toString() + "' "
                + "and e.TenKhoaHoc=N'" + cbbddkhoahoc.getSelectedItem().toString() + "'");
        cbbddmonhoc.setModel(cbbmodel);
        loadNgay();
        cbbddngay.setModel(cbbmodel);
        //load du lieu vao table
        String sql = "SELECT Distinct(g.SinhVienID),a.TenSinhVien,b.TenLop, g.TrangThai "
                + "from SinhVien a,Lop b,DiemDanh g "
                + "where a.LopID = b.LopID and a.SinhVienID=g.SinhVienID "
                + "and g.NgayDiemDanh=N'" + cbbddngay.getSelectedItem().toString() + "' "
                + "and g.TKBID in(Select e.TKBID from Nhom a,Ky b,KhoaHoc c,Khoa d, ThoiKhoaBieu e,MonHoc f  "
                + "where a.KyID=b.KyID and b.KhoaHocID=c.KhoaHocID and c.KhoaID = d.KhoaID and a.NhomID=e.NhomID and e.MonID=f.MonHocID "
                + "and f.TenMon=N'" + cbbddmonhoc.getSelectedItem().toString() + "' "
                + "and a.TenNhom=N'" + cbbddnhom.getSelectedItem().toString() + "' "
                + "and b.TenKy=N'" + cbbddkyhoc.getSelectedItem().toString() + "' "
                + "and c.TenKhoaHoc=N'" + cbbddkhoahoc.getSelectedItem().toString() + "' "
                + "and d.TenKhoa=N'" + cbbddkhoa.getSelectedItem().toString() + "')";
        SetDataCheckBoxDiemDanh(tableDiemDanh, sql);
    }//GEN-LAST:event_cbbddkhoaItemStateChanged

    private void cbbddkhoahocItemStateChanged(java.awt.event.ItemEvent evt) {//GEN-FIRST:event_cbbddkhoahocItemStateChanged
        // TODO add your handling code here:
        SetDataCombobox("Select a.TenKy from Ky a, KhoaHoc b,Khoa c "
                + "where a.KhoaHocID = b.KhoaHocID and b.KhoaID = c.KhoaID "
                + "and b.TenKhoaHoc = N'" + cbbddkhoahoc.getSelectedItem().toString() + "' "
                + "and c.TenKhoa = N'" + cbbddkhoa.getSelectedItem().toString() + "'");
        cbbddkyhoc.setModel(cbbmodel);
        SetDataCombobox("Select d.TenNhom from Ky a, KhoaHoc b,Khoa c, Nhom d "
                + "where a.KhoaHocID = b.KhoaHocID and b.KhoaID = c.KhoaID and d.KyID=a.KyID "
                + "and b.TenKhoaHoc = N'" + cbbddkhoahoc.getSelectedItem().toString() + "' "
                + "and c.TenKhoa = N'" + cbbddkhoa.getSelectedItem().toString() + "' "
                + "and a.TenKy = N'" + cbbddkyhoc.getSelectedItem().toString() + "'");
        cbbddnhom.setModel(cbbmodel);

        SetDataCombobox("Select distinct(a.TenMon) from ThoiKhoaBieu g,MonHoc a,Khoa b,Nhom c,Ky d,KhoaHoc e "
                + "where a.KhoaID=b.KhoaID and g.NhomID=c.NhomID and g.MonID=a.MonHocID and c.KyID=d.KyID "
                + "and d.KhoaHocID = e.KhoaHocID and e.KhoaID= b.KhoaID "
                + "and b.TenKhoa=N'" + cbbddkhoa.getSelectedItem().toString() + "' "
                + "and c.TenNhom=N'" + cbbddnhom.getSelectedItem().toString() + "' "
                + "and d.TenKy =N'" + cbbddkyhoc.getSelectedItem().toString() + "' "
                + "and e.TenKhoaHoc=N'" + cbbddkhoahoc.getSelectedItem().toString() + "'");
        cbbddmonhoc.setModel(cbbmodel);
        loadNgay();
        cbbddngay.setModel(cbbmodel);
        //load du lieu vao table
        //load du lieu vao table
        String sql = "SELECT Distinct(g.SinhVienID),a.TenSinhVien,b.TenLop, g.TrangThai "
                + "from SinhVien a,Lop b,DiemDanh g "
                + "where a.LopID = b.LopID and a.SinhVienID=g.SinhVienID "
                + "and g.NgayDiemDanh=N'" + cbbddngay.getSelectedItem().toString() + "' "
                + "and g.TKBID in(Select e.TKBID from Nhom a,Ky b,KhoaHoc c,Khoa d, ThoiKhoaBieu e,MonHoc f  "
                + "where a.KyID=b.KyID and b.KhoaHocID=c.KhoaHocID and c.KhoaID = d.KhoaID and a.NhomID=e.NhomID and e.MonID=f.MonHocID "
                + "and f.TenMon=N'" + cbbddmonhoc.getSelectedItem().toString() + "' "
                + "and a.TenNhom=N'" + cbbddnhom.getSelectedItem().toString() + "' "
                + "and b.TenKy=N'" + cbbddkyhoc.getSelectedItem().toString() + "' "
                + "and c.TenKhoaHoc=N'" + cbbddkhoahoc.getSelectedItem().toString() + "' "
                + "and d.TenKhoa=N'" + cbbddkhoa.getSelectedItem().toString() + "')";
        SetDataCheckBoxDiemDanh(tableDiemDanh, sql);
    }//GEN-LAST:event_cbbddkhoahocItemStateChanged

    private void cbbddkyhocItemStateChanged(java.awt.event.ItemEvent evt) {//GEN-FIRST:event_cbbddkyhocItemStateChanged
        // TODO add your handling code here:
        SetDataCombobox("Select d.TenNhom from Ky a, KhoaHoc b,Khoa c, Nhom d "
                + "where a.KhoaHocID = b.KhoaHocID and b.KhoaID = c.KhoaID and d.KyID=a.KyID "
                + "and b.TenKhoaHoc = N'" + cbbddkhoahoc.getSelectedItem().toString() + "' "
                + "and c.TenKhoa = N'" + cbbddkhoa.getSelectedItem().toString() + "' "
                + "and a.TenKy = N'" + cbbddkyhoc.getSelectedItem().toString() + "'");
        cbbddnhom.setModel(cbbmodel);

        SetDataCombobox("Select distinct(a.TenMon) from ThoiKhoaBieu g,MonHoc a,Khoa b,Nhom c,Ky d,KhoaHoc e "
                + "where a.KhoaID=b.KhoaID and g.NhomID=c.NhomID and g.MonID=a.MonHocID and c.KyID=d.KyID "
                + "and d.KhoaHocID = e.KhoaHocID and e.KhoaID= b.KhoaID "
                + "and b.TenKhoa=N'" + cbbddkhoa.getSelectedItem().toString() + "' "
                + "and c.TenNhom=N'" + cbbddnhom.getSelectedItem().toString() + "' "
                + "and d.TenKy =N'" + cbbddkyhoc.getSelectedItem().toString() + "' "
                + "and e.TenKhoaHoc=N'" + cbbddkhoahoc.getSelectedItem().toString() + "'");
        cbbddmonhoc.setModel(cbbmodel);
        loadNgay();
        cbbddngay.setModel(cbbmodel);
        //load du lieu vao table
        String sql = "SELECT Distinct(g.SinhVienID),a.TenSinhVien,b.TenLop, g.TrangThai "
                + "from SinhVien a,Lop b,DiemDanh g "
                + "where a.LopID = b.LopID and a.SinhVienID=g.SinhVienID "
                + "and g.NgayDiemDanh=N'" + cbbddngay.getSelectedItem().toString() + "' "
                + "and g.TKBID in(Select e.TKBID from Nhom a,Ky b,KhoaHoc c,Khoa d, ThoiKhoaBieu e,MonHoc f  "
                + "where a.KyID=b.KyID and b.KhoaHocID=c.KhoaHocID and c.KhoaID = d.KhoaID and a.NhomID=e.NhomID and e.MonID=f.MonHocID "
                + "and f.TenMon=N'" + cbbddmonhoc.getSelectedItem().toString() + "' "
                + "and a.TenNhom=N'" + cbbddnhom.getSelectedItem().toString() + "' "
                + "and b.TenKy=N'" + cbbddkyhoc.getSelectedItem().toString() + "' "
                + "and c.TenKhoaHoc=N'" + cbbddkhoahoc.getSelectedItem().toString() + "' "
                + "and d.TenKhoa=N'" + cbbddkhoa.getSelectedItem().toString() + "')";
        SetDataCheckBoxDiemDanh(tableDiemDanh, sql);
    }//GEN-LAST:event_cbbddkyhocItemStateChanged

    private void cbbddnhomItemStateChanged(java.awt.event.ItemEvent evt) {//GEN-FIRST:event_cbbddnhomItemStateChanged

        // TODO add your handling code here:

        SetDataCombobox("Select distinct(a.TenMon) from ThoiKhoaBieu g,MonHoc a,Khoa b,Nhom c,Ky d,KhoaHoc e "
                + "where a.KhoaID=b.KhoaID and g.NhomID=c.NhomID and g.MonID=a.MonHocID and c.KyID=d.KyID "
                + "and d.KhoaHocID = e.KhoaHocID and e.KhoaID= b.KhoaID "
                + "and b.TenKhoa=N'" + cbbddkhoa.getSelectedItem().toString() + "' "
                + "and c.TenNhom=N'" + cbbddnhom.getSelectedItem().toString() + "' "
                + "and d.TenKy =N'" + cbbddkyhoc.getSelectedItem().toString() + "' "
                + "and e.TenKhoaHoc=N'" + cbbddkhoahoc.getSelectedItem().toString() + "'");
        cbbddmonhoc.setModel(cbbmodel);
        loadNgay();
        cbbddngay.setModel(cbbmodel);
        //load du lieu vao table
        String sql = "SELECT Distinct(g.SinhVienID),a.TenSinhVien,b.TenLop, g.TrangThai "
                + "from SinhVien a,Lop b,DiemDanh g "
                + "where a.LopID = b.LopID and a.SinhVienID=g.SinhVienID "
                + "and g.NgayDiemDanh=N'" + cbbddngay.getSelectedItem().toString() + "' "
                + "and g.TKBID in(Select e.TKBID from Nhom a,Ky b,KhoaHoc c,Khoa d, ThoiKhoaBieu e,MonHoc f  "
                + "where a.KyID=b.KyID and b.KhoaHocID=c.KhoaHocID and c.KhoaID = d.KhoaID and a.NhomID=e.NhomID and e.MonID=f.MonHocID "
                + "and f.TenMon=N'" + cbbddmonhoc.getSelectedItem().toString() + "' "
                + "and a.TenNhom=N'" + cbbddnhom.getSelectedItem().toString() + "' "
                + "and b.TenKy=N'" + cbbddkyhoc.getSelectedItem().toString() + "' "
                + "and c.TenKhoaHoc=N'" + cbbddkhoahoc.getSelectedItem().toString() + "' "
                + "and d.TenKhoa=N'" + cbbddkhoa.getSelectedItem().toString() + "')";
        SetDataCheckBoxDiemDanh(tableDiemDanh, sql);
    }//GEN-LAST:event_cbbddnhomItemStateChanged

    private void cbbddmonhocItemStateChanged(java.awt.event.ItemEvent evt) {//GEN-FIRST:event_cbbddmonhocItemStateChanged
        // TODO add your handling code here:
        loadNgay();
        cbbddngay.setModel(cbbmodel);
        //load du lieu vao table
        String sql = "SELECT Distinct(g.SinhVienID),a.TenSinhVien,b.TenLop, g.TrangThai "
                + "from SinhVien a,Lop b,DiemDanh g "
                + "where a.LopID = b.LopID and a.SinhVienID=g.SinhVienID "
                + "and g.NgayDiemDanh=N'" + cbbddngay.getSelectedItem().toString() + "' "
                + "and g.TKBID in(Select e.TKBID from Nhom a,Ky b,KhoaHoc c,Khoa d, ThoiKhoaBieu e,MonHoc f  "
                + "where a.KyID=b.KyID and b.KhoaHocID=c.KhoaHocID and c.KhoaID = d.KhoaID and a.NhomID=e.NhomID and e.MonID=f.MonHocID "
                + "and f.TenMon=N'" + cbbddmonhoc.getSelectedItem().toString() + "' "
                + "and a.TenNhom=N'" + cbbddnhom.getSelectedItem().toString() + "' "
                + "and b.TenKy=N'" + cbbddkyhoc.getSelectedItem().toString() + "' "
                + "and c.TenKhoaHoc=N'" + cbbddkhoahoc.getSelectedItem().toString() + "' "
                + "and d.TenKhoa=N'" + cbbddkhoa.getSelectedItem().toString() + "')";
        SetDataCheckBoxDiemDanh(tableDiemDanh, sql);
    }//GEN-LAST:event_cbbddmonhocItemStateChanged

    private void cbbddngayItemStateChanged(java.awt.event.ItemEvent evt) {//GEN-FIRST:event_cbbddngayItemStateChanged
        // TODO add your handling code here:
        //load du lieu vao table
        String sql = "SELECT Distinct(g.SinhVienID),a.TenSinhVien,b.TenLop, g.TrangThai "
                + "from SinhVien a,Lop b,DiemDanh g "
                + "where a.LopID = b.LopID and a.SinhVienID=g.SinhVienID "
                + "and g.NgayDiemDanh=N'" + cbbddngay.getSelectedItem().toString() + "' "
                + "and g.TKBID in(Select e.TKBID from Nhom a,Ky b,KhoaHoc c,Khoa d, ThoiKhoaBieu e,MonHoc f  "
                + "where a.KyID=b.KyID and b.KhoaHocID=c.KhoaHocID and c.KhoaID = d.KhoaID and a.NhomID=e.NhomID and e.MonID=f.MonHocID "
                + "and f.TenMon=N'" + cbbddmonhoc.getSelectedItem().toString() + "' "
                + "and a.TenNhom=N'" + cbbddnhom.getSelectedItem().toString() + "' "
                + "and b.TenKy=N'" + cbbddkyhoc.getSelectedItem().toString() + "' "
                + "and c.TenKhoaHoc=N'" + cbbddkhoahoc.getSelectedItem().toString() + "' "
                + "and d.TenKhoa=N'" + cbbddkhoa.getSelectedItem().toString() + "')";
        SetDataCheckBoxDiemDanh(tableDiemDanh, sql);
    }//GEN-LAST:event_cbbddngayItemStateChanged

    private void cbbtkbnhomItemStateChanged(java.awt.event.ItemEvent evt) {//GEN-FIRST:event_cbbtkbnhomItemStateChanged
        // TODO add your handling code here:
        SetDataTKB("Select a.TKBID,b.TenMon,c.TenGiangVien,a.Thu2,a.Thu3,a.Thu4,a.Thu5,a.Thu6,a.Thu7, "
                + "a.TietBatDau,a.TietKetThuc,a.TongSoBuoi,a.Phong,a.TrangThai "
                + "from ThoiKhoaBieu a,MonHoc b,GiangVien c "
                + "where a.MonID=b.MonHocID and a.GiangVienID = c.GiangVienID "
                + "and a.NhomID in(select a.NhomID "
                + "from Nhom a,Ky b,KhoaHoc c,Khoa d "
                + "where a.KyID = b.KyID  and b.KhoaHocID = c.KhoaHocID and c.KhoaID = d.KhoaID "
                + "and d.TenKhoa=N'" + cbbtkbkhoa.getSelectedItem().toString() + "' "
                + "and c.TenKhoaHoc=N'" + cbbtkbkhoahoc.getSelectedItem().toString() + "' "
                + "and b.TenKy = N'" + cbbtkbky.getSelectedItem().toString() + "' "
                + "and a.TenNhom=N'" + cbbtkbnhom.getSelectedItem().toString() + "')");
        tableThoiKhoaBieu.setModel(model);
    }//GEN-LAST:event_cbbtkbnhomItemStateChanged

    private void btnddSaveActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnddSaveActionPerformed
        // TODO add your handling code here:
        try {
            Vector all = mymodel1.getAllData();
            System.out.println(all.size());
            for (int i = 0; i < all.size(); i++) {
                Vector dong = (Vector) all.get(i);

                call = con.prepareCall("{call SuaDiemDanh(?,?,?,?,?,?,?,?)}");
                call.setString(1, cbbddkhoa.getSelectedItem().toString());
                call.setString(2, cbbddkhoahoc.getSelectedItem().toString());
                call.setString(3, cbbddkyhoc.getSelectedItem().toString());
                call.setString(4, cbbddnhom.getSelectedItem().toString());
                call.setString(5, cbbddmonhoc.getSelectedItem().toString());
                call.setDate(6, getDate(formatStringToDate(cbbddngay.getSelectedItem().toString()).getTime()));
                call.setString(7, dong.get(0).toString());
                System.out.println(dong.get(0).toString());
                call.setBoolean(8, Boolean.parseBoolean(dong.get(1).toString()));
                System.out.println(Boolean.parseBoolean(dong.get(1).toString()));
                call.execute();

            }
            JOptionPane.showMessageDialog(rootPane, "Cập nhật thành công");
        } catch (Exception ex) {
            System.out.println(ex.getMessage());
            JOptionPane.showMessageDialog(rootPane, "Cập nhật không thành công");
        }

        //load du lieu vao table
        //load du lieu vao table
        String sql = "SELECT Distinct(g.SinhVienID),a.TenSinhVien,b.TenLop, g.TrangThai "
                + "from SinhVien a,Lop b,DiemDanh g "
                + "where a.LopID = b.LopID and a.SinhVienID=g.SinhVienID "
                + "and g.NgayDiemDanh=N'" + cbbddngay.getSelectedItem().toString() + "' "
                + "and g.TKBID in(Select e.TKBID from Nhom a,Ky b,KhoaHoc c,Khoa d, ThoiKhoaBieu e,MonHoc f  "
                + "where a.KyID=b.KyID and b.KhoaHocID=c.KhoaHocID and c.KhoaID = d.KhoaID and a.NhomID=e.NhomID and e.MonID=f.MonHocID "
                + "and f.TenMon=N'" + cbbddmonhoc.getSelectedItem().toString() + "' "
                + "and a.TenNhom=N'" + cbbddnhom.getSelectedItem().toString() + "' "
                + "and b.TenKy=N'" + cbbddkyhoc.getSelectedItem().toString() + "' "
                + "and c.TenKhoaHoc=N'" + cbbddkhoahoc.getSelectedItem().toString() + "' "
                + "and d.TenKhoa=N'" + cbbddkhoa.getSelectedItem().toString() + "')";
        SetDataCheckBoxDiemDanh(tableDiemDanh, sql);

    }//GEN-LAST:event_btnddSaveActionPerformed

    private void cbbpnkyhocItemStateChanged(java.awt.event.ItemEvent evt) {//GEN-FIRST:event_cbbpnkyhocItemStateChanged
        // TODO add your handling code here:
        SetDataCombobox("Select d.TenNhom from Ky a, KhoaHoc b,Khoa c, Nhom d "
                + "where a.KhoaHocID = b.KhoaHocID and b.KhoaID = c.KhoaID and d.KyID=a.KyID "
                + "and b.TenKhoaHoc=N'" + cbbpnkhoahoc1.getSelectedItem().toString() + "' "
                + "and c.TenKhoa = N'" + cbbpnkhoa.getSelectedItem().toString() + "' "
                + "and a.TenKy = N'" + cbbpnkyhoc.getSelectedItem().toString() + "' "
                + "and d.TrangThai='Enable'");
        cbbpnnhom.setModel(cbbmodel);
        SetDataCombobox("Select b.TenMon from ThoiKhoaBieu a,MonHoc b,Khoa c,Nhom d,Ky e,KhoaHoc f "
                + "where a.MonID=b.MonHocID and b.KhoaID=c.KhoaID and a.NhomID=d.NhomID "
                + "and d.KyID=e.KyID and e.KhoaHocID=f.KhoaHocID and f.KhoaID=c.KhoaID "
                + "and c.TenKhoa=N'" + cbbpnkhoa.getSelectedItem().toString() + "' "
                + "and d.TenNhom=N'" + cbbpnnhom.getSelectedItem().toString() + "' "
                + "and e.TenKy=N'" + cbbpnkyhoc.getSelectedItem().toString() + "' "
                + "and f.TenKhoaHoc=N'" + cbbpnkhoahoc1.getSelectedItem().toString() + "'");
        cbbpnmon.setModel(cbbmodel);

        //load du lieu vao tableSinhVienLop
        String sql = "Select a.SinhVienID,a.TenSinhVien from SinhVien a,Lop b,KhoaHoc c,Khoa d "
                + "where a.LopID=b.LopID and b.KhoaHocID = c.KhoaHocID and c.KhoaID=d.KhoaID "
                + "and b.TenLop=N'" + cbbpnlop.getSelectedItem().toString() + "' "
                + "and c.TenKhoaHoc=N'" + cbbpnkhoahoc.getSelectedItem().toString() + "' "
                + "and d.TenKhoa=N'" + cbbpnkhoa.getSelectedItem().toString() + "' "
                + "and a.SinhVienID not in(Select a.SinhVienID from PhanNhom a,ThoiKhoaBieu b,MonHoc c,Khoa d "
                + "where a.TKBID = b.TKBID and b.MonID=c.MonHocID and c.KhoaID= d.KhoaID "
                + "and c.TenMon=N'" + cbbpnmon.getSelectedItem().toString() + "' "
                + "and d.TenKhoa=N'" + cbbpnkhoa.getSelectedItem().toString() + "' "
                + "and b.NhomID in(Select a.NhomID from Nhom a,Ky b,KhoaHoc c,Khoa d "
                + "where a.KyID=b.KyID and b.KhoaHocID = c.KhoaHocID and c.KhoaID=d.KhoaID "
                + "and a.TenNhom=N'" + cbbpnnhom.getSelectedItem().toString() + "' "
                + "and b.TenKy =N'" + cbbpnkyhoc.getSelectedItem().toString() + "' "
                + "and c.TenKhoaHoc=N'" + cbbpnkhoahoc1.getSelectedItem().toString() + "' "
                + "and d.TenKhoa=N'" + cbbpnkhoa.getSelectedItem().toString() + "'))";
        SetDataCheckBox1(tableSinhVienLop, sql);

        //load du lieu vao bang tableSinhVienNhom
        sql = "Select f.SinhVienID,f.TenSinhVien from PhanNhom a,ThoiKhoaBieu b,MonHoc c,Khoa d,SinhVien f "
                + "where f.SinhVienID=a.SinhVienID and a.TKBID = b.TKBID and b.MonID=c.MonHocID and c.KhoaID= d.KhoaID "
                + "and c.TenMon=N'" + cbbpnmon.getSelectedItem().toString() + "' "
                + "and d.TenKhoa=N'" + cbbpnkhoa.getSelectedItem().toString() + "' "
                + "and b.NhomID in(Select a.NhomID from Nhom a,Ky b,KhoaHoc c,Khoa d "
                + "where a.KyID=b.KyID and b.KhoaHocID = c.KhoaHocID and c.KhoaID=d.KhoaID "
                + "and a.TenNhom=N'" + cbbpnnhom.getSelectedItem().toString() + "' "
                + "and b.TenKy =N'" + cbbpnkyhoc.getSelectedItem().toString() + "' "
                + "and c.TenKhoaHoc=N'" + cbbpnkhoahoc1.getSelectedItem().toString() + "' "
                + "and d.TenKhoa=N'" + cbbpnkhoa.getSelectedItem().toString() + "')";
        SetDataCheckBox2(tableSinhVienNhom, sql);
    }//GEN-LAST:event_cbbpnkyhocItemStateChanged

    private void jPanel12ComponentShown(java.awt.event.ComponentEvent evt) {//GEN-FIRST:event_jPanel12ComponentShown
        // TODO add your handling code here:
        SetDataCombobox("Select TenKhoa from Khoa");
        cbbtpkhoa.setModel(cbbmodel);
        SetDataCombobox("Select Distinct(a.TenKhoaHoc) "
                + "from KhoaHoc a,Khoa b "
                + "where a.KhoaID = b.KhoaID and b.TenKhoa = N'" + cbbtpkhoa.getSelectedItem().toString() + "'");
        cbbtpkhoahoc.setModel(cbbmodel);
        SetDataCombobox("Select a.TenKy from Ky a, KhoaHoc b,Khoa c "
                + "where a.KhoaHocID = b.KhoaHocID and b.KhoaID = c.KhoaID "
                + "and b.TenKhoaHoc=N'" + cbbtpkhoahoc.getSelectedItem().toString() + "' "
                + "and c.TenKhoa = N'" + cbbtpkhoa.getSelectedItem().toString() + "'");
        cbbtpkyhoc.setModel(cbbmodel);
        SetDataComboboxLop(("Select a.TenLop from Lop a, KhoaHoc b,Khoa c where "
                + "a.KhoaHocID=b.KhoaHocID and b.KhoaID=c.KhoaID "
                + "and b.TenKhoaHoc=N'" + cbbtpkhoahoc.getSelectedItem().toString() + "' "
                + "and c.TenKhoa=N'" + cbbtpkhoa.getSelectedItem().toString() + "'"));
        cbbtplop.setModel(cbbmodel);
        SetDataComboboxNhom("Select d.TenNhom from Ky a, KhoaHoc b,Khoa c, Nhom d "
                + "where a.KhoaHocID = b.KhoaHocID and b.KhoaID = c.KhoaID and d.KyID=a.KyID "
                + "and b.TenKhoaHoc=N'" + cbbtpkhoahoc.getSelectedItem().toString() + "' "
                + "and c.TenKhoa = N'" + cbbtpkhoa.getSelectedItem().toString() + "' "
                + "and a.TenKy = N'" + cbbtpkyhoc.getSelectedItem().toString() + "' "
                + "and d.TrangThai='Enable'");
        cbbtpnhom.setModel(cbbmodel);
        try {
            if (cbbtplop.getSelectedItem().toString().equals("Chọn lớp") && cbbtpnhom.getSelectedItem().toString().equals("Chọn nhóm")) {

                SelectKhoa(tableFine, "{call SelectKhoa(?,?,?,?)}");

            } else if (cbbtpnhom.getSelectedItem().toString().equals("Chọn nhóm")) {
                SelectLop(tableFine, "{call SelectLop(?,?,?,?,?)}");
            } else {
                SelectNhom(tableFine, "{call SelectNhom(?,?,?,?,?)}");
            }
        } catch (Exception ex) {
            System.out.println(ex.getMessage());
        }


    }//GEN-LAST:event_jPanel12ComponentShown

    private void cbbtpkhoaItemStateChanged(java.awt.event.ItemEvent evt) {//GEN-FIRST:event_cbbtpkhoaItemStateChanged
        // TODO add your handling code here:
        SetDataCombobox("Select Distinct(a.TenKhoaHoc) "
                + "from KhoaHoc a,Khoa b "
                + "where a.KhoaID = b.KhoaID and b.TenKhoa = N'" + cbbtpkhoa.getSelectedItem().toString() + "'");
        cbbtpkhoahoc.setModel(cbbmodel);
        SetDataCombobox("Select a.TenKy from Ky a, KhoaHoc b,Khoa c "
                + "where a.KhoaHocID = b.KhoaHocID and b.KhoaID = c.KhoaID "
                + "and b.TenKhoaHoc=N'" + cbbtpkhoahoc.getSelectedItem().toString() + "' "
                + "and c.TenKhoa = N'" + cbbtpkhoa.getSelectedItem().toString() + "'");
        cbbtpkyhoc.setModel(cbbmodel);
        SetDataComboboxLop(("Select a.TenLop from Lop a, KhoaHoc b,Khoa c where "
                + "a.KhoaHocID=b.KhoaHocID and b.KhoaID=c.KhoaID "
                + "and b.TenKhoaHoc=N'" + cbbtpkhoahoc.getSelectedItem().toString() + "' "
                + "and c.TenKhoa=N'" + cbbtpkhoa.getSelectedItem().toString() + "'"));
        cbbtplop.setModel(cbbmodel);
        SetDataComboboxNhom("Select d.TenNhom from Ky a, KhoaHoc b,Khoa c, Nhom d "
                + "where a.KhoaHocID = b.KhoaHocID and b.KhoaID = c.KhoaID and d.KyID=a.KyID "
                + "and b.TenKhoaHoc=N'" + cbbtpkhoahoc.getSelectedItem().toString() + "' "
                + "and c.TenKhoa = N'" + cbbtpkhoa.getSelectedItem().toString() + "' "
                + "and a.TenKy = N'" + cbbtpkyhoc.getSelectedItem().toString() + "' "
                + "and d.TrangThai='Enable'");
        cbbtpnhom.setModel(cbbmodel);
        try {
            if (cbbtplop.getSelectedItem().toString().equals("Chọn lớp") && cbbtpnhom.getSelectedItem().toString().equals("Chọn nhóm")) {

                SelectKhoa(tableFine, "{call SelectKhoa(?,?,?,?)}");

            } else if (cbbtpnhom.getSelectedItem().toString().equals("Chọn nhóm")) {
                SelectLop(tableFine, "{call SelectLop(?,?,?,?,?)}");
            } else {
                SelectNhom(tableFine, "{call SelectNhom(?,?,?,?,?)}");
            }
        } catch (Exception ex) {
            System.out.println(ex.getMessage());
        }
    }//GEN-LAST:event_cbbtpkhoaItemStateChanged

    private void cbbtpkhoahocItemStateChanged(java.awt.event.ItemEvent evt) {//GEN-FIRST:event_cbbtpkhoahocItemStateChanged
        // TODO add your handling code here:
        SetDataCombobox("Select a.TenKy from Ky a, KhoaHoc b,Khoa c "
                + "where a.KhoaHocID = b.KhoaHocID and b.KhoaID = c.KhoaID "
                + "and b.TenKhoaHoc=N'" + cbbtpkhoahoc.getSelectedItem().toString() + "' "
                + "and c.TenKhoa = N'" + cbbtpkhoa.getSelectedItem().toString() + "'");
        cbbtpkyhoc.setModel(cbbmodel);
        SetDataComboboxLop(("Select a.TenLop from Lop a, KhoaHoc b,Khoa c where "
                + "a.KhoaHocID=b.KhoaHocID and b.KhoaID=c.KhoaID "
                + "and b.TenKhoaHoc=N'" + cbbtpkhoahoc.getSelectedItem().toString() + "' "
                + "and c.TenKhoa=N'" + cbbtpkhoa.getSelectedItem().toString() + "'"));
        cbbtplop.setModel(cbbmodel);
        SetDataComboboxNhom("Select d.TenNhom from Ky a, KhoaHoc b,Khoa c, Nhom d "
                + "where a.KhoaHocID = b.KhoaHocID and b.KhoaID = c.KhoaID and d.KyID=a.KyID "
                + "and b.TenKhoaHoc=N'" + cbbtpkhoahoc.getSelectedItem().toString() + "' "
                + "and c.TenKhoa = N'" + cbbtpkhoa.getSelectedItem().toString() + "' "
                + "and a.TenKy = N'" + cbbtpkyhoc.getSelectedItem().toString() + "' "
                + "and d.TrangThai='Enable'");
        cbbtpnhom.setModel(cbbmodel);
        try {
            if (cbbtplop.getSelectedItem().toString().equals("Chọn lớp") && cbbtpnhom.getSelectedItem().toString().equals("Chọn nhóm")) {

                SelectKhoa(tableFine, "{call SelectKhoa(?,?,?,?)}");

            } else if (cbbtpnhom.getSelectedItem().toString().equals("Chọn nhóm")) {
                SelectLop(tableFine, "{call SelectLop(?,?,?,?,?)}");
            } else {
                SelectNhom(tableFine, "{call SelectNhom(?,?,?,?,?)}");
            }
        } catch (Exception ex) {
            System.out.println(ex.getMessage());
        }
    }//GEN-LAST:event_cbbtpkhoahocItemStateChanged

    private void cbbtpkyhocItemStateChanged(java.awt.event.ItemEvent evt) {//GEN-FIRST:event_cbbtpkyhocItemStateChanged
        // TODO add your handling code here:
        SetDataComboboxLop(("Select a.TenLop from Lop a, KhoaHoc b,Khoa c where "
                + "a.KhoaHocID=b.KhoaHocID and b.KhoaID=c.KhoaID "
                + "and b.TenKhoaHoc=N'" + cbbtpkhoahoc.getSelectedItem().toString() + "' "
                + "and c.TenKhoa=N'" + cbbtpkhoa.getSelectedItem().toString() + "'"));
        cbbtplop.setModel(cbbmodel);
        SetDataComboboxNhom("Select d.TenNhom from Ky a, KhoaHoc b,Khoa c, Nhom d "
                + "where a.KhoaHocID = b.KhoaHocID and b.KhoaID = c.KhoaID and d.KyID=a.KyID "
                + "and b.TenKhoaHoc=N'" + cbbtpkhoahoc.getSelectedItem().toString() + "' "
                + "and c.TenKhoa = N'" + cbbtpkhoa.getSelectedItem().toString() + "' "
                + "and a.TenKy = N'" + cbbtpkyhoc.getSelectedItem().toString() + "' "
                + "and d.TrangThai='Enable'");
        cbbtpnhom.setModel(cbbmodel);
        try {
            if (cbbtplop.getSelectedItem().toString().equals("Chọn lớp") && cbbtpnhom.getSelectedItem().toString().equals("Chọn nhóm")) {

                SelectKhoa(tableFine, "{call SelectKhoa(?,?,?,?)}");

            } else if (cbbtpnhom.getSelectedItem().toString().equals("Chọn nhóm")) {
                SelectLop(tableFine, "{call SelectLop(?,?,?,?,?)}");
            } else {
                SelectNhom(tableFine, "{call SelectNhom(?,?,?,?,?)}");
            }
        } catch (Exception ex) {
            System.out.println(ex.getMessage());
        }
    }//GEN-LAST:event_cbbtpkyhocItemStateChanged

    private void cbbtplopItemStateChanged(java.awt.event.ItemEvent evt) {//GEN-FIRST:event_cbbtplopItemStateChanged
        // TODO add your handling code here:
        cbbtpnhom.setSelectedIndex(0);
        try {
            if (cbbtplop.getSelectedItem().toString().equals("Chọn lớp") && cbbtpnhom.getSelectedItem().toString().equals("Chọn nhóm")) {

                SelectKhoa(tableFine, "{call SelectKhoa(?,?,?,?)}");

            } else if (cbbtpnhom.getSelectedItem().toString().equals("Chọn nhóm")) {
                SelectLop(tableFine, "{call SelectLop(?,?,?,?,?)}");
            } else {
                SelectNhom(tableFine, "{call SelectNhom(?,?,?,?,?)}");
            }
        } catch (Exception ex) {
            System.out.println(ex.getMessage());
        }
    }//GEN-LAST:event_cbbtplopItemStateChanged

    private void cbbtpnhomItemStateChanged(java.awt.event.ItemEvent evt) {//GEN-FIRST:event_cbbtpnhomItemStateChanged
        // TODO add your handling code here:
        cbbtplop.setSelectedIndex(0);
        try {
            if (cbbtplop.getSelectedItem().toString().equals("Chọn lớp") && cbbtpnhom.getSelectedItem().toString().equals("Chọn nhóm")) {

                SelectKhoa(tableFine, "{call SelectKhoa(?,?,?,?)}");

            } else if (cbbtpnhom.getSelectedItem().toString().equals("Chọn nhóm")) {
                SelectLop(tableFine, "{call SelectLop(?,?,?,?,?)}");
            } else {
                SelectNhom(tableFine, "{call SelectNhom(?,?,?,?,?)}");
            }
        } catch (Exception ex) {
            System.out.println(ex.getMessage());
        }
    }//GEN-LAST:event_cbbtpnhomItemStateChanged

    private void cbbtpdanhsachItemStateChanged(java.awt.event.ItemEvent evt) {//GEN-FIRST:event_cbbtpdanhsachItemStateChanged
        // TODO add your handling code here:
        if (cbbtpdanhsach.getSelectedItem().toString().equals("Danh sách thi") || cbbtpdanhsach.getSelectedItem().toString().equals("Danh sách không được thi")) {
            btntpCapNhat.setVisible(false);
        } else {
            btntpCapNhat.setVisible(true);
        }
        try {
            if (cbbtplop.getSelectedItem().toString().equals("Chọn lớp") && cbbtpnhom.getSelectedItem().toString().equals("Chọn nhóm")) {

                SelectKhoa(tableFine, "{call SelectKhoa(?,?,?,?)}");

            } else if (cbbtpnhom.getSelectedItem().toString().equals("Chọn nhóm")) {
                SelectLop(tableFine, "{call SelectLop(?,?,?,?,?)}");
            } else {
                SelectNhom(tableFine, "{call SelectNhom(?,?,?,?,?)}");
            }
        } catch (Exception ex) {
            System.out.println(ex.getMessage());
        }
    }//GEN-LAST:event_cbbtpdanhsachItemStateChanged

    private void btntpCapNhatActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btntpCapNhatActionPerformed
        // TODO add your handling code here:
        Vector v = mymodel1.getAllData();
        try {
            for (int i = 0; i < v.size(); i++) {
                Vector dong = (Vector) v.get(i);
                call = con.prepareCall("{call CapNhatTienPhat(?,?,?,?,?)}");
                call.setString(1, cbbtpkhoa.getSelectedItem().toString());
                call.setString(2, cbbtpkhoahoc.getSelectedItem().toString());
                call.setString(3, cbbtpkyhoc.getSelectedItem().toString());
                call.setString(4, dong.get(0).toString());
                call.setBoolean(5, Boolean.parseBoolean(dong.get(1).toString()));
                call.execute();

            }
            JOptionPane.showMessageDialog(rootPane, "Cập nhật thành công");
            if (cbbtplop.getSelectedItem().toString().equals("Chọn lớp") && cbbtpnhom.getSelectedItem().toString().equals("Chọn nhóm")) {

                SelectKhoa(tableFine, "{call SelectKhoa(?,?,?,?)}");

            } else if (cbbtpnhom.getSelectedItem().toString().equals("Chọn nhóm")) {
                SelectLop(tableFine, "{call SelectLop(?,?,?,?,?)}");
            } else {
                SelectNhom(tableFine, "{call SelectNhom(?,?,?,?,?)}");
            }
        } catch (Exception ex) {
            JOptionPane.showMessageDialog(rootPane, "Cập nhật không thành công");
            System.out.println(ex.getMessage());
        }

    }//GEN-LAST:event_btntpCapNhatActionPerformed

    private void txttpSearchKeyPressed(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_txttpSearchKeyPressed
        // TODO add your handling code here:
        try {
            String key = txttpSearch.getText().trim();
            String sql = "";
            if (checkIfNumber(key.substring(2, key.length())) && key.substring(0, 2).equals("SV")) {
                if (cbbtplop.getSelectedItem().toString().equals("Chọn lớp") && cbbtpnhom.getSelectedItem().toString().equals("Chọn nhóm")) {

                    SelectKhoaSearch("{call SelectKhoaSearchSVID(?,?,?,?,?)}");

                } else if (cbbtpnhom.getSelectedItem().toString().equals("Chọn nhóm")) {
                    SelectLopSearch("{call SelectLopSearchSVID(?,?,?,?,?,?)}");
                } else {
                    SelectNhomSearch("{call SelectNhomSearchSVID(?,?,?,?,?)}");
                }
            } else {
                if (cbbtplop.getSelectedItem().toString().equals("Chọn lớp") && cbbtpnhom.getSelectedItem().toString().equals("Chọn nhóm")) {

                    SelectKhoaSearch("{call SelectKhoaSearch(?,?,?,?,?)}");

                } else if (cbbtpnhom.getSelectedItem().toString().equals("Chọn nhóm")) {
                    SelectLopSearch("{call SelectLopSearch(?,?,?,?,?,?)}");
                } else {
                    SelectNhomSearch("{call SelectNhomSearch(?,?,?,?,?)}");
                }
            }
            tableFine.setModel(mymodel1);

        } catch (Exception ex) {
            //System.out.println("1"+ex.getMessage());
        }

    }//GEN-LAST:event_txttpSearchKeyPressed

    private void txttpSearchKeyReleased(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_txttpSearchKeyReleased
        // TODO add your handling code here:
        String key = txttpSearch.getText().trim();
        if (key.equals("")) {
            try {
                if (cbbtplop.getSelectedItem().toString().equals("Chọn lớp") && cbbtpnhom.getSelectedItem().toString().equals("Chọn nhóm")) {

                    SelectKhoa(tableFine, "{call SelectKhoa(?,?,?,?)}");

                } else if (cbbtpnhom.getSelectedItem().toString().equals("Chọn nhóm")) {
                    SelectLop(tableFine, "{call SelectLop(?,?,?,?,?)}");
                } else {
                    SelectNhom(tableFine, "{call SelectNhom(?,?,?,?,?)}");
                }
            } catch (Exception ex) {
                JOptionPane.showMessageDialog(rootPane, "Cập nhật không thành công");
                System.out.println(ex.getMessage());
            }
        }
    }//GEN-LAST:event_txttpSearchKeyReleased

    private void btnxoauserActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnxoauserActionPerformed
        // TODO add your handling code here:
        if (tableGiangVien1.getSelectedRow() == -1) {
            JOptionPane.showMessageDialog(rootPane, "Vui lòng chọn user muốn xóa");
        } else {
            int confirm = JOptionPane.showConfirmDialog(rootPane, "Bạn có chắc chắn xóa user này");
            if (confirm == JOptionPane.OK_OPTION) {
                try {
                    pre = con.prepareCall("{call DeleteUser(?)}");
                    call.setString(1, tableGiangVien1.getValueAt(tableGiangVien1.getSelectedRow(), 0).toString());
                    pre.executeUpdate();
                    JOptionPane.showMessageDialog(rootPane, "Cập nhật thành công");
                    rduser.setSelected(true);
                    String sql = "Select a.GiangVienID, a.TenGiangVien, b.Role,b.TrangThai from GiangVien a,Users b "
                            + "where a.GiangVienID = b.StaffID";
                    SetData(sql);
                    tableGiangVien1.setModel(model);
                    JOptionPane.showMessageDialog(rootPane, "Xóa thành công");
                } catch (SQLException ex) {
                    JOptionPane.showMessageDialog(rootPane, "Xóa không thành công");
                }
            }
        }

    }//GEN-LAST:event_btnxoauserActionPerformed

    private void btnxemprofileActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnxemprofileActionPerformed
        // TODO add your handling code here:
        qlgvCreate1.setVisible(true);
        qlgvEdit1.setVisible(false);
        loadProfile();
    }//GEN-LAST:event_btnxemprofileActionPerformed

    private void btnuCapNhatActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnuCapNhatActionPerformed
        // TODO add your handling code here:

        try {
            call = con.prepareCall("{call EditProfile(?,?,?,?,?,?,?,?,?,?,?,?,?)}");
            call.setString(1, menuStaffID.getText());
            call.setString(2, txtuhoten1.getText());
            call.setString(3, cbbukhoa.getSelectedItem().toString());
            call.setDate(4, getDate(dateungaysinh.getDate().getTime()));
            call.setString(5, cbbugioitinh1.getSelectedItem().toString());
            call.setString(6, txtudantoc.getText());
            call.setString(7, txtuquoctich.getText());
            call.setString(8, txtuemail.getText());
            call.setString(9, txtudienthoai.getText());
            call.setString(10, txtucmnd.getText());
            call.setString(11, txtudiachi.getText());
            call.setString(12, txtuhocvi.getText());
            call.setString(13, cbbuTrangThai.getSelectedItem().toString());
            call.execute();
            JOptionPane.showMessageDialog(rootPane, "Cập nhật thành công");
            loadProfile();
        } catch (Exception ex) {
            System.out.println(ex.getMessage());
            JOptionPane.showMessageDialog(rootPane, "Cập nhật không thành công");
        }

    }//GEN-LAST:event_btnuCapNhatActionPerformed

    private void txtuemailActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_txtuemailActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_txtuemailActionPerformed

    private void txtuserKeyPressed(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_txtuserKeyPressed
        // TODO add your handling code here:
        try {
            String key = txtuser.getText().trim();
            String sql = "";
            if (checkIfNumber(key.substring(2, key.length())) && key.substring(0, 2).equals("GV")) {
                if (rduser.isSelected()) {
                    sql = "Select a.GiangVienID, a.TenGiangVien, b.Role,b.TrangThai from GiangVien a,Users b "
                            + "where a.GiangVienID = b.StaffID and a.GiangVienID='" + key + "'";
                    SetData(sql);
                    tableGiangVien1.setModel(model);
                }
                if (rdgv.isSelected()) {
                    sql = "Select a.GiangVienID, a.TenGiangVien, b.TenKhoa,a.NgaySinh,a.GioiTinh from GiangVien a,Khoa b "
                            + "where a.KhoaID = b.KhoaID and a.GiangVienID='" + key + "'";
                    SetData(sql);
                    tableGiangVien1.setModel(model);
                }
            } else {
                if (rduser.isSelected()) {
                    sql = "Select a.GiangVienID, a.TenGiangVien, b.Role,b.TrangThai from GiangVien a,Users b "
                            + "where a.GiangVienID = b.StaffID and a.TenGiangVien like N'%" + key + "%'";
                    SetData(sql);
                    tableGiangVien1.setModel(model);
                }
                if (rdgv.isSelected()) {
                    sql = "Select a.GiangVienID, a.TenGiangVien, b.TenKhoa,a.NgaySinh,a.GioiTinh from GiangVien a,Khoa b "
                            + "where a.KhoaID = b.KhoaID and (a.TenGiangVien like N'%" + key + "%' "
                            + "or b.TenKhoa like N'%" + key + "%')";
                    SetData(sql);
                    tableGiangVien1.setModel(model);
                }
            }
        } catch (Exception ex) {
        }
    }//GEN-LAST:event_txtuserKeyPressed

    private void txtuserKeyReleased(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_txtuserKeyReleased
        // TODO add your handling code here:
        String key = txtuser.getText().trim();
        String sql = "";
        if (key.equals("")) {
            if (rduser.isSelected()) {
                sql = "Select a.GiangVienID, a.TenGiangVien, b.Role,b.TrangThai from GiangVien a,Users b "
                        + "where a.GiangVienID = b.StaffID";
                SetData(sql);
                tableGiangVien1.setModel(model);
            }
            if (rdgv.isSelected()) {
                sql = "Select a.GiangVienID, a.TenGiangVien, b.TenKhoa,a.NgaySinh,a.GioiTinh from GiangVien a,Khoa b "
                        + "where a.KhoaID = b.KhoaID";
                SetData(sql);
                tableGiangVien1.setModel(model);
            }
        }
    }//GEN-LAST:event_txtuserKeyReleased

    private void tableGiangVien1MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_tableGiangVien1MouseClicked
        // TODO add your handling code here:
        if (rduser.isSelected()) {
            qlgvEditUser.setVisible(true);
            qlgvCreate1.setVisible(false);
            qlgvEdit1.setVisible(false);
            txtugvid.setText(tableGiangVien1.getValueAt(tableGiangVien1.getSelectedRow(), 0).toString());
            txtugvid.setEditable(false);
            txtuhoten3.setText(tableGiangVien1.getValueAt(tableGiangVien1.getSelectedRow(), 1).toString());
            txtuhoten3.setEditable(false);
            cbburole1.setSelectedItem(tableGiangVien1.getValueAt(tableGiangVien1.getSelectedRow(), 2).toString());
        }
        if (rdgv.isSelected()) {
            qlgvEditUser.setVisible(false);
            qlgvCreate1.setVisible(false);
            qlgvEdit1.setVisible(true);
            txtugvidthem.setText(tableGiangVien1.getValueAt(tableGiangVien1.getSelectedRow(), 0).toString());
            txtugvidthem.setEditable(false);
            txtuhoten2.setText(tableGiangVien1.getValueAt(tableGiangVien1.getSelectedRow(), 1).toString());
            txtuhoten2.setEditable(false);
            txtukhoa.setText(tableGiangVien1.getValueAt(tableGiangVien1.getSelectedRow(), 2).toString());
            txtukhoa.setEditable(false);
            cbbugioitinhthem.setSelectedItem(tableGiangVien1.getValueAt(tableGiangVien1.getSelectedRow(), 4).toString());
            cbbugioitinhthem.setEditable(false);
        }

    }//GEN-LAST:event_tableGiangVien1MouseClicked

    private void txtukhoaActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_txtukhoaActionPerformed
        // TODO add your handling code here:
}//GEN-LAST:event_txtukhoaActionPerformed

    private void btngvCapnhat1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btngvCapnhat1ActionPerformed
        // TODO add your handling code here:

        if (!pass.getText().equals(retypepass.getText())) {
            JOptionPane.showMessageDialog(rootPane, "Password nhập không đúng");
        } else {
            try {
                MD5 md5 = new MD5();
                call = con.prepareCall("{call CreateUser(?,?,?,?)}");
                call.setString(1, txtugvidthem.getText());
                call.setString(2, md5.getMd5Digest(pass.getText()));
                call.setString(3, cbburole.getSelectedItem().toString());
                call.setString(4, cbbutrangthai.getSelectedItem().toString());
                call.execute();
                JOptionPane.showMessageDialog(rootPane, "Thêm user thành công");
                rduser.setSelected(true);
                String sql = "Select a.GiangVienID, a.TenGiangVien, b.Role,b.TrangThai from GiangVien a,Users b "
                        + "where a.GiangVienID = b.StaffID";
                SetData(sql);
                tableGiangVien1.setModel(model);
            } catch (Exception ex) {
                System.out.println(ex.getMessage());
                JOptionPane.showMessageDialog(rootPane, "Thêm không thành công");
            }
        }
}//GEN-LAST:event_btngvCapnhat1ActionPerformed

    private void btnxemprofile1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnxemprofile1ActionPerformed
        // TODO add your handling code here:
        qlgvCreate1.setVisible(false);
        qlgvEdit1.setVisible(false);
        qlgvEditUser.setVisible(true);
        txtugvid.setText(menuStaffID.getText());
        txtugvid.setEditable(false);
        txtuhoten3.setEditable(false);
        try {
            call = con.prepareCall("Select a.TenGiangVien, b.Role,b.TrangThai from GiangVien a,Users b where a.GiangVienID=b.StaffID and b.StaffID='" + menuStaffID.getText() + "'");
            rs = call.executeQuery();
            rs.next();
            txtuhoten3.setText(rs.getString(1));
            cbburole1.setSelectedItem(rs.getString(2));
            cbbutrangthai1.setSelectedItem(rs.getString(3));

        } catch (Exception ex) {
            System.out.println(ex.getMessage());
        }
    }//GEN-LAST:event_btnxemprofile1ActionPerformed

    private void jPanel14ComponentShown(java.awt.event.ComponentEvent evt) {//GEN-FIRST:event_jPanel14ComponentShown
        // TODO add your handling code here:
        SetDataCombobox("Select TenKhoa from Khoa");
        cbbukhoa.setModel(cbbmodel);
        loadProfile();
        btgrounduser.add(rduser);
        btgrounduser.add(rdgv);
        rduser.setSelected(true);
        try {
            if (rduser.isSelected()) {
                String sql = "Select a.GiangVienID, a.TenGiangVien, b.Role,b.TrangThai from GiangVien a,Users b "
                        + "where a.GiangVienID = b.StaffID";
                SetData(sql);
                tableGiangVien1.setModel(model);
            }
            if (rdgv.isSelected()) {
                String sql = "Select a.GiangVienID, a.TenGiangVien, b.TenKhoa,a.NgaySinh,a.GioiTinh from GiangVien a,Khoa b "
                        + "where a.KhoaID = b.KhoaID";
                SetData(sql);
                tableGiangVien1.setModel(model);
            }
        } catch (Exception ex) {
            System.out.println(ex.getMessage());
        }
    }//GEN-LAST:event_jPanel14ComponentShown

    private void rduserItemStateChanged(java.awt.event.ItemEvent evt) {//GEN-FIRST:event_rduserItemStateChanged
        // TODO add your handling code here:
        String sql = "Select a.GiangVienID, a.TenGiangVien, b.Role,b.TrangThai from GiangVien a,Users b "
                + "where a.GiangVienID = b.StaffID";
        SetData(sql);
        tableGiangVien1.setModel(model);
        btnxoauser.setVisible(true);
    }//GEN-LAST:event_rduserItemStateChanged

    private void rdgvItemStateChanged(java.awt.event.ItemEvent evt) {//GEN-FIRST:event_rdgvItemStateChanged
        // TODO add your handling code here:
        String sql = "Select a.GiangVienID, a.TenGiangVien, b.TenKhoa,a.NgaySinh,a.GioiTinh from GiangVien a,Khoa b "
                + "where a.KhoaID = b.KhoaID";
        SetData(sql);
        tableGiangVien1.setModel(model);
        btnxoauser.setVisible(false);
    }//GEN-LAST:event_rdgvItemStateChanged

    private void btngvCapnhat2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btngvCapnhat2ActionPerformed
        // TODO add your handling code here:
        if (!pass1.getText().equals(retypepass1.getText())) {
            JOptionPane.showMessageDialog(rootPane, "Mật khẩu nhập không đúng");
        } else {
            try {
                call = con.prepareCall("{call UpdateUser(?,?,?,?)}");
                call.setString(1, txtugvid.getText());
                call.setString(2, pass1.getText());
                call.setString(3, cbburole1.getSelectedItem().toString());
                call.setString(4, cbbutrangthai1.getSelectedItem().toString());
                call.execute();
                JOptionPane.showMessageDialog(rootPane, "Cập nhật thành công");
                rduser.setSelected(true);
                String sql = "Select a.GiangVienID, a.TenGiangVien, b.Role,b.TrangThai from GiangVien a,Users b "
                        + "where a.GiangVienID = b.StaffID";
                SetData(sql);
                tableGiangVien1.setModel(model);
            } catch (Exception ex) {
                System.out.println(ex.getMessage());
                JOptionPane.showMessageDialog(rootPane, "Cập nhật không thành công");
            }
        }
    }//GEN-LAST:event_btngvCapnhat2ActionPerformed

    private void cbbutrangthaiActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_cbbutrangthaiActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_cbbutrangthaiActionPerformed

    private void searchKeyPressed(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_searchKeyPressed
        // TODO add your handling code here:
        try {
            String key = search.getText().trim();
            String sql = "";
           if (checkIfNumber(key.substring(2, key.length()))&& (TKB.isSelected()))
            {



             String sql2="Select distinct a.TKBID,b.TenMon,c.TenGiangVien,a.Thu2,a.Thu3,a.Thu4,a.Thu5,a.Thu6,a.Thu7,a.TietBatDau,a.TietKetThuc,a.TongSoBuoi,a.Phong"
                    +" from ThoiKhoaBieu a,MonHoc b,GiangVien c,Nhom d"
                    +" where a.MonID=b.MonHocID and a.GiangVienID = c.GiangVienID and a.NhomID = d.NhomID"
                    +" and d.NhomID like N'%"+key+"%'";
            SetDataTKB(sql2);
            }
            if (checkIfNumber(key.substring(1, key.length()))&& (DSNHOM.isSelected()))
            {
            String sql4="Select distinct a.NhomID,a.TenNhom,b.TenKy,c.TenKhoaHoc,d.TenKhoa,a.TrangThai"
                +" from Nhom a, Ky b, KhoaHoc c,Khoa d"
                +" where a.KyID=b.KyID and b.KhoaHocID = c.KhoaHocID and c.KhoaID = d.KhoaID"
                +" and c.TenKhoaHoc like N'%"+key+"%'"
              //  +" and c.TenKhoaHoc='08'"
                    +" order by(a.NhomID) DESC";
            SetDataTKB(sql4);
            }
            if ((DSLOP.isSelected())) {
            String sql6="Select a.SinhVienID,a.TenSinhVien,b.TenLop,a.GioiTinh,a.NgaySinh,a.Email,a.DienThoai"
               +" from SinhVien a,Lop b"
                +" where a.LopID = b.LopID and b.TenLop like N'%"+key+"%'";
            SetDataTKB(sql6);
            }

//            if ( (THONGTINSV.isSelected()))
//            {
////                sql="Select a.SinhVienID,a.TenSinhVien,c.TenLop,a.GioiTinh,a.NgaySinh,a.Email,a.DienThoai"
////                   +" from SinhVien a,Lop b"
////                   +" where a.LopID = b.LopID"
////                   +" and a.TenSinhVien like N'%"+key+"%'";
//            String sql8="select c.GiangVienID,c.TenGiangVien,d.TenKhoa,c.NgaySinh,c.GioiTinh,c.Email,c.DienThoai"
//                    +" from GiangVien c,Khoa d"
//                    +" where c.KhoaID = d.KhoaID"
//                    +" and c.TenGiangVien like N'%"+key+"%'";
//            SetDataTKB(sql8);
//            }
            SetData(sql);
            TIMKIEM.setModel(model);
        } catch (Exception ex) {
        }
    }//GEN-LAST:event_searchKeyPressed

    private void searchKeyReleased(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_searchKeyReleased
        // TODO add your handling code here:
        String key = search.getText().trim();
        String sql = "";
        if (key.equals("")){
            if(TKB.isSelected())
            {
                String sql1="Select distinct a.TKBID,b.TenMon,c.TenGiangVien,a.Thu2,a.Thu3,a.Thu4,a.Thu5,a.Thu6,a.Thu7, a.TietBatDau,a.TietKetThuc,a.TongSoBuoi,a.Phong"+
                   " from ThoiKhoaBieu a,MonHoc b,GiangVien c,Nhom d "
                  +" where a.MonID=b.MonHocID and a.GiangVienID = c.GiangVienID and a.NhomID = d.NhomID";
                 SetDataTKB(sql1);
            }
            if(DSNHOM.isSelected())
            {
                String sql3="Select distinct a.NhomID,a.TenNhom,b.TenKy,c.TenKhoaHoc,d.TenKhoa,a.TrangThai "
                + "from Nhom a, Ky b, KhoaHoc c,Khoa d"
                + " where a.KyID=b.KyID and b.KhoaHocID = c.KhoaHocID and c.KhoaID = d.KhoaID";
            SetDataTKB(sql3);
            }
             if(DSLOP.isSelected())
            {
                 String sql5="Select distinct a.SinhVienID,a.TenSinhVien,b.TenLop,a.GioiTinh,a.NgaySinh,a.Email,a.DienThoai "
                     +"from SinhVien a,Lop b"
                     +" where a.LopID = b.LopID";
            SetDataTKB(sql5);
               }
//             if (THONGTINSV.isSelected())
//             {
//                 sql="Select distinct a.SinhVienID,a.TenSinhVien,c.TenLop,a.GioiTinh,a.NgaySinh,a.Email,a.DienThoai"
//                   +" from SinhVien a,Lop b"
//                   +" where a.LopID = b.LopID ";
//                String sql7="select c.GiangVienID,c.TenGiangVien,d.TenKhoa,c.NgaySinh,c.GioiTinh,c.Email,c.DienThoai "
//                    +"from GiangVien c,Khoa d"
//                    +" where c.KhoaID = d.KhoaID";
//                SetDataTKB(sql7);
//
//             }
        }
//        SetData(sql);
        TIMKIEM.setModel(model);

    }//GEN-LAST:event_searchKeyReleased

    private void TKBActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_TKBActionPerformed
        // TODO add your handling code here:
         DSNHOM.setSelected(false);
        DSLOP.setSelected(false);
    }//GEN-LAST:event_TKBActionPerformed

    private void DSNHOMActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_DSNHOMActionPerformed
        // TODO add your handling code here:
          TKB.setSelected(false);
        DSLOP.setSelected(false);
    }//GEN-LAST:event_DSNHOMActionPerformed

    private void DSLOPActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_DSLOPActionPerformed
        // TODO add your handling code here:
        DSNHOM.setSelected(false);
        TKB.setSelected(false);
    }//GEN-LAST:event_DSLOPActionPerformed

    private void txtloptenlop1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_txtloptenlop1ActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_txtloptenlop1ActionPerformed

    private void txtmhtong1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_txtmhtong1ActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_txtmhtong1ActionPerformed

    /**
     * @param args the command line arguments
     */
    public static void main(String args[]) {
        java.awt.EventQueue.invokeLater(new Runnable() {

            public void run() {
                new AITSM().setVisible(true);
            }
        });
    }
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JRadioButton DSLOP;
    private javax.swing.JRadioButton DSNHOM;
    private javax.swing.JTable TIMKIEM;
    private javax.swing.JRadioButton TKB;
    private javax.swing.JButton bntReset;
    private javax.swing.ButtonGroup btgrounduser;
    private javax.swing.JButton btnCreate1;
    private javax.swing.JButton btnCreate11;
    private javax.swing.JButton btnCreate13;
    private javax.swing.JButton btnCreate15;
    private javax.swing.JButton btnCreate20;
    private javax.swing.JButton btnCreate21;
    private javax.swing.JButton btnCreate3;
    private javax.swing.JButton btnCreate4;
    private javax.swing.JButton btnCreate5;
    private javax.swing.JButton btnCreate6;
    private javax.swing.JButton btnCreate7;
    private javax.swing.JButton btnCreate8;
    private javax.swing.JButton btnCreate9;
    private javax.swing.JButton btnDelete13;
    private javax.swing.JButton btnDelete7;
    private javax.swing.JButton btnDelete9;
    private javax.swing.JButton btnKCapNhat;
    private javax.swing.JButton btnKDelete;
    private javax.swing.JButton btnKHCapNhat;
    private javax.swing.JButton btnKHDelete;
    private javax.swing.JButton btnKResetT;
    private javax.swing.JButton btnKThemmoiT;
    private javax.swing.JButton btnThemmoi;
    private javax.swing.JButton btnddSave;
    private javax.swing.JButton btnddds1;
    private javax.swing.JButton btngvCapnhat;
    private javax.swing.JButton btngvCapnhat1;
    private javax.swing.JButton btngvCapnhat2;
    private javax.swing.JButton btngvReset;
    private javax.swing.JButton btngvThem;
    private javax.swing.JButton btngvdelete;
    private javax.swing.JButton btnkyCapnhat;
    private javax.swing.JButton btnlopcapnhat;
    private javax.swing.JButton btnlopreset;
    private javax.swing.JButton btnmhCapnhat;
    private javax.swing.JButton btnmhreset;
    private javax.swing.JButton btnmhthem;
    private javax.swing.JButton btnnhomcapnhat;
    private javax.swing.JButton btnnhomreset;
    private javax.swing.JButton btnnhomthem;
    private javax.swing.JButton btnnhomxoa;
    private javax.swing.JButton btnpnthem;
    private javax.swing.JButton btnpnxoa;
    private javax.swing.JButton btnsvcapnhat;
    private javax.swing.JButton btnsvdelete;
    private javax.swing.JButton btnsvreset;
    private javax.swing.JButton btnsvthem;
    private javax.swing.JButton btntkbCapNhat;
    private javax.swing.JButton btntkbDelete;
    private javax.swing.JButton btntkbThem;
    private javax.swing.JButton btntpCapNhat;
    private javax.swing.JButton btnuCapNhat;
    private javax.swing.JButton btnxemprofile;
    private javax.swing.JButton btnxemprofile1;
    private javax.swing.JButton btnxoauser;
    private javax.swing.JComboBox cbbKHKhoa;
    private javax.swing.JComboBox cbbKHKhoa2;
    private javax.swing.JComboBox cbbKTrangThai2;
    private javax.swing.JComboBox cbbKTrangThaiT;
    private javax.swing.JComboBox cbbKYKhoa1;
    private javax.swing.JComboBox cbbKYKhoa3;
    private javax.swing.JComboBox cbbKYKhoaHoc1;
    private javax.swing.JComboBox cbbKyKhoaHoc2;
    private javax.swing.JComboBox cbbddkhoa;
    private javax.swing.JComboBox cbbddkhoahoc;
    private javax.swing.JComboBox cbbddkyhoc;
    private javax.swing.JComboBox cbbddmonhoc;
    private javax.swing.JComboBox cbbddngay;
    private javax.swing.JComboBox cbbddnhom;
    private javax.swing.JComboBox cbbgvgioitinh1;
    private javax.swing.JComboBox cbbgvgioitinh2;
    private javax.swing.JComboBox cbbgvkhoa1;
    private javax.swing.JComboBox cbbgvkhoa2;
    private javax.swing.JComboBox cbbgvtt1;
    private javax.swing.JComboBox cbbgvtt2;
    private javax.swing.JComboBox cbblopKhoa1;
    private javax.swing.JComboBox cbblopKhoaHoc1;
    private javax.swing.JComboBox cbblopkhoa2;
    private javax.swing.JComboBox cbblopkhoahoc2;
    private javax.swing.JComboBox cbbmhKhoa2;
    private javax.swing.JComboBox cbbmhkhoa1;
    private javax.swing.JComboBox cbbmhtt1;
    private javax.swing.JComboBox cbbmhtt2;
    private javax.swing.JComboBox cbbnhomkhoa1;
    private javax.swing.JComboBox cbbnhomkhoa2;
    private javax.swing.JComboBox cbbnhomkhoahoc1;
    private javax.swing.JComboBox cbbnhomkhoahoc2;
    private javax.swing.JComboBox cbbnhomky1;
    private javax.swing.JComboBox cbbnhomky2;
    private javax.swing.JComboBox cbbnhomtt1;
    private javax.swing.JComboBox cbbnhomtt2;
    private javax.swing.JComboBox cbbpnkhoa;
    private javax.swing.JComboBox cbbpnkhoahoc;
    private javax.swing.JComboBox cbbpnkhoahoc1;
    private javax.swing.JComboBox cbbpnkyhoc;
    private javax.swing.JComboBox cbbpnlop;
    private javax.swing.JComboBox cbbpnmon;
    private javax.swing.JComboBox cbbpnnhom;
    private javax.swing.JComboBox cbbsvgioitinh2;
    private javax.swing.JComboBox cbbsvgiotinh1;
    private javax.swing.JComboBox cbbsvkhoa1;
    private javax.swing.JComboBox cbbsvkhoa2;
    private javax.swing.JComboBox cbbsvkhoahoc1;
    private javax.swing.JComboBox cbbsvkhoahoc2;
    private javax.swing.JComboBox cbbsvlop1;
    private javax.swing.JComboBox cbbsvlop2;
    private javax.swing.JComboBox cbbsvtt1;
    private javax.swing.JComboBox cbbsvtt2;
    private javax.swing.JComboBox cbbtkbgiangvien2;
    private javax.swing.JComboBox cbbtkbgiangvien3;
    private javax.swing.JComboBox cbbtkbkhoa;
    private javax.swing.JComboBox cbbtkbkhoahoc;
    private javax.swing.JComboBox cbbtkbky;
    private javax.swing.JComboBox cbbtkbmon2;
    private javax.swing.JComboBox cbbtkbmon3;
    private javax.swing.JComboBox cbbtkbnhom;
    private javax.swing.JComboBox cbbtkbtbd2;
    private javax.swing.JComboBox cbbtkbtbd3;
    private javax.swing.JComboBox cbbtkbthu2;
    private javax.swing.JComboBox cbbtkbthu3;
    private javax.swing.JComboBox cbbtkbtkt2;
    private javax.swing.JComboBox cbbtkbtkt3;
    private javax.swing.JComboBox cbbtkbtt2;
    private javax.swing.JComboBox cbbtkbtt3;
    private javax.swing.JComboBox cbbtpdanhsach;
    private javax.swing.JComboBox cbbtpkhoa;
    private javax.swing.JComboBox cbbtpkhoahoc;
    private javax.swing.JComboBox cbbtpkyhoc;
    private javax.swing.JComboBox cbbtplop;
    private javax.swing.JComboBox cbbtpnhom;
    private javax.swing.JComboBox cbbuTrangThai;
    private javax.swing.JComboBox cbbugioitinh1;
    private javax.swing.JComboBox cbbugioitinhthem;
    private javax.swing.JComboBox cbbukhoa;
    private javax.swing.JComboBox cbburole;
    private javax.swing.JComboBox cbburole1;
    private javax.swing.JComboBox cbbutrangthai;
    private javax.swing.JComboBox cbbutrangthai1;
    private com.toedter.calendar.JDateChooser dateKYNKT1;
    private com.toedter.calendar.JDateChooser dateKyNBD1;
    private com.toedter.calendar.JDateChooser dategvNgaysinh2;
    private com.toedter.calendar.JDateChooser dategvngaysinh1;
    private com.toedter.calendar.JDateChooser datekynkt2;
    private com.toedter.calendar.JDateChooser datenbd2;
    private com.toedter.calendar.JDateChooser datesvngaysinh1;
    private com.toedter.calendar.JDateChooser datesvngaysinh2;
    private com.toedter.calendar.JDateChooser dateungaysinh;
    private javax.swing.JButton jButton28;
    private javax.swing.JButton jButton30;
    private javax.swing.JButton jButton31;
    private javax.swing.JButton jButton4;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel100;
    private javax.swing.JLabel jLabel101;
    private javax.swing.JLabel jLabel102;
    private javax.swing.JLabel jLabel103;
    private javax.swing.JLabel jLabel104;
    private javax.swing.JLabel jLabel105;
    private javax.swing.JLabel jLabel106;
    private javax.swing.JLabel jLabel107;
    private javax.swing.JLabel jLabel108;
    private javax.swing.JLabel jLabel11;
    private javax.swing.JLabel jLabel110;
    private javax.swing.JLabel jLabel111;
    private javax.swing.JLabel jLabel112;
    private javax.swing.JLabel jLabel113;
    private javax.swing.JLabel jLabel114;
    private javax.swing.JLabel jLabel115;
    private javax.swing.JLabel jLabel116;
    private javax.swing.JLabel jLabel117;
    private javax.swing.JLabel jLabel118;
    private javax.swing.JLabel jLabel119;
    private javax.swing.JLabel jLabel12;
    private javax.swing.JLabel jLabel120;
    private javax.swing.JLabel jLabel121;
    private javax.swing.JLabel jLabel122;
    private javax.swing.JLabel jLabel123;
    private javax.swing.JLabel jLabel124;
    private javax.swing.JLabel jLabel125;
    private javax.swing.JLabel jLabel126;
    private javax.swing.JLabel jLabel127;
    private javax.swing.JLabel jLabel128;
    private javax.swing.JLabel jLabel129;
    private javax.swing.JLabel jLabel130;
    private javax.swing.JLabel jLabel131;
    private javax.swing.JLabel jLabel132;
    private javax.swing.JLabel jLabel133;
    private javax.swing.JLabel jLabel134;
    private javax.swing.JLabel jLabel135;
    private javax.swing.JLabel jLabel136;
    private javax.swing.JLabel jLabel137;
    private javax.swing.JLabel jLabel138;
    private javax.swing.JLabel jLabel139;
    private javax.swing.JLabel jLabel14;
    private javax.swing.JLabel jLabel140;
    private javax.swing.JLabel jLabel141;
    private javax.swing.JLabel jLabel142;
    private javax.swing.JLabel jLabel143;
    private javax.swing.JLabel jLabel144;
    private javax.swing.JLabel jLabel145;
    private javax.swing.JLabel jLabel146;
    private javax.swing.JLabel jLabel147;
    private javax.swing.JLabel jLabel148;
    private javax.swing.JLabel jLabel149;
    private javax.swing.JLabel jLabel150;
    private javax.swing.JLabel jLabel151;
    private javax.swing.JLabel jLabel152;
    private javax.swing.JLabel jLabel153;
    private javax.swing.JLabel jLabel154;
    private javax.swing.JLabel jLabel155;
    private javax.swing.JLabel jLabel156;
    private javax.swing.JLabel jLabel157;
    private javax.swing.JLabel jLabel158;
    private javax.swing.JLabel jLabel159;
    private javax.swing.JLabel jLabel16;
    private javax.swing.JLabel jLabel160;
    private javax.swing.JLabel jLabel161;
    private javax.swing.JLabel jLabel162;
    private javax.swing.JLabel jLabel163;
    private javax.swing.JLabel jLabel164;
    private javax.swing.JLabel jLabel165;
    private javax.swing.JLabel jLabel166;
    private javax.swing.JLabel jLabel167;
    private javax.swing.JLabel jLabel168;
    private javax.swing.JLabel jLabel169;
    private javax.swing.JLabel jLabel17;
    private javax.swing.JLabel jLabel170;
    private javax.swing.JLabel jLabel171;
    private javax.swing.JLabel jLabel172;
    private javax.swing.JLabel jLabel173;
    private javax.swing.JLabel jLabel174;
    private javax.swing.JLabel jLabel175;
    private javax.swing.JLabel jLabel176;
    private javax.swing.JLabel jLabel177;
    private javax.swing.JLabel jLabel178;
    private javax.swing.JLabel jLabel179;
    private javax.swing.JLabel jLabel18;
    private javax.swing.JLabel jLabel180;
    private javax.swing.JLabel jLabel182;
    private javax.swing.JLabel jLabel183;
    private javax.swing.JLabel jLabel184;
    private javax.swing.JLabel jLabel185;
    private javax.swing.JLabel jLabel186;
    private javax.swing.JLabel jLabel187;
    private javax.swing.JLabel jLabel189;
    private javax.swing.JLabel jLabel190;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JLabel jLabel20;
    private javax.swing.JLabel jLabel21;
    private javax.swing.JLabel jLabel22;
    private javax.swing.JLabel jLabel23;
    private javax.swing.JLabel jLabel24;
    private javax.swing.JLabel jLabel25;
    private javax.swing.JLabel jLabel26;
    private javax.swing.JLabel jLabel27;
    private javax.swing.JLabel jLabel28;
    private javax.swing.JLabel jLabel29;
    private javax.swing.JLabel jLabel3;
    private javax.swing.JLabel jLabel30;
    private javax.swing.JLabel jLabel31;
    private javax.swing.JLabel jLabel33;
    private javax.swing.JLabel jLabel34;
    private javax.swing.JLabel jLabel35;
    private javax.swing.JLabel jLabel36;
    private javax.swing.JLabel jLabel37;
    private javax.swing.JLabel jLabel38;
    private javax.swing.JLabel jLabel40;
    private javax.swing.JLabel jLabel41;
    private javax.swing.JLabel jLabel42;
    private javax.swing.JLabel jLabel43;
    private javax.swing.JLabel jLabel44;
    private javax.swing.JLabel jLabel45;
    private javax.swing.JLabel jLabel46;
    private javax.swing.JLabel jLabel47;
    private javax.swing.JLabel jLabel49;
    private javax.swing.JLabel jLabel5;
    private javax.swing.JLabel jLabel50;
    private javax.swing.JLabel jLabel51;
    private javax.swing.JLabel jLabel52;
    private javax.swing.JLabel jLabel53;
    private javax.swing.JLabel jLabel54;
    private javax.swing.JLabel jLabel55;
    private javax.swing.JLabel jLabel56;
    private javax.swing.JLabel jLabel58;
    private javax.swing.JLabel jLabel59;
    private javax.swing.JLabel jLabel6;
    private javax.swing.JLabel jLabel60;
    private javax.swing.JLabel jLabel61;
    private javax.swing.JLabel jLabel62;
    private javax.swing.JLabel jLabel63;
    private javax.swing.JLabel jLabel64;
    private javax.swing.JLabel jLabel65;
    private javax.swing.JLabel jLabel66;
    private javax.swing.JLabel jLabel67;
    private javax.swing.JLabel jLabel68;
    private javax.swing.JLabel jLabel69;
    private javax.swing.JLabel jLabel7;
    private javax.swing.JLabel jLabel70;
    private javax.swing.JLabel jLabel71;
    private javax.swing.JLabel jLabel72;
    private javax.swing.JLabel jLabel73;
    private javax.swing.JLabel jLabel74;
    private javax.swing.JLabel jLabel75;
    private javax.swing.JLabel jLabel76;
    private javax.swing.JLabel jLabel77;
    private javax.swing.JLabel jLabel78;
    private javax.swing.JLabel jLabel79;
    private javax.swing.JLabel jLabel8;
    private javax.swing.JLabel jLabel80;
    private javax.swing.JLabel jLabel81;
    private javax.swing.JLabel jLabel82;
    private javax.swing.JLabel jLabel83;
    private javax.swing.JLabel jLabel84;
    private javax.swing.JLabel jLabel85;
    private javax.swing.JLabel jLabel86;
    private javax.swing.JLabel jLabel87;
    private javax.swing.JLabel jLabel88;
    private javax.swing.JLabel jLabel89;
    private javax.swing.JLabel jLabel9;
    private javax.swing.JLabel jLabel90;
    private javax.swing.JLabel jLabel91;
    private javax.swing.JLabel jLabel92;
    private javax.swing.JLabel jLabel93;
    private javax.swing.JLabel jLabel94;
    private javax.swing.JLabel jLabel95;
    private javax.swing.JLabel jLabel96;
    private javax.swing.JLabel jLabel97;
    private javax.swing.JLabel jLabel98;
    private javax.swing.JLabel jLabel99;
    private javax.swing.JMenu jMenu1;
    private javax.swing.JMenu jMenu3;
    private javax.swing.JMenu jMenu4;
    private javax.swing.JPanel jPanel1;
    private javax.swing.JPanel jPanel10;
    private javax.swing.JPanel jPanel11;
    private javax.swing.JPanel jPanel12;
    private javax.swing.JPanel jPanel13;
    private javax.swing.JPanel jPanel14;
    private javax.swing.JPanel jPanel15;
    private javax.swing.JPanel jPanel16;
    private javax.swing.JPanel jPanel17;
    private javax.swing.JPanel jPanel18;
    private javax.swing.JPanel jPanel19;
    private javax.swing.JPanel jPanel2;
    private javax.swing.JPanel jPanel20;
    private javax.swing.JPanel jPanel21;
    private javax.swing.JPanel jPanel22;
    private javax.swing.JPanel jPanel23;
    private javax.swing.JPanel jPanel24;
    private javax.swing.JPanel jPanel25;
    private javax.swing.JPanel jPanel26;
    private javax.swing.JPanel jPanel27;
    private javax.swing.JPanel jPanel28;
    private javax.swing.JPanel jPanel29;
    private javax.swing.JPanel jPanel3;
    private javax.swing.JPanel jPanel30;
    private javax.swing.JPanel jPanel31;
    private javax.swing.JPanel jPanel32;
    private javax.swing.JPanel jPanel4;
    private javax.swing.JPanel jPanel5;
    private javax.swing.JPanel jPanel6;
    private javax.swing.JPanel jPanel7;
    private javax.swing.JPanel jPanel8;
    private javax.swing.JPanel jPanel9;
    private javax.swing.JRadioButton jRadioButton4;
    private javax.swing.JScrollPane jScrollPane1;
    private javax.swing.JScrollPane jScrollPane10;
    private javax.swing.JScrollPane jScrollPane11;
    private javax.swing.JScrollPane jScrollPane12;
    private javax.swing.JScrollPane jScrollPane13;
    private javax.swing.JScrollPane jScrollPane14;
    private javax.swing.JScrollPane jScrollPane15;
    private javax.swing.JScrollPane jScrollPane2;
    private javax.swing.JScrollPane jScrollPane3;
    private javax.swing.JScrollPane jScrollPane4;
    private javax.swing.JScrollPane jScrollPane5;
    private javax.swing.JScrollPane jScrollPane6;
    private javax.swing.JScrollPane jScrollPane7;
    private javax.swing.JScrollPane jScrollPane8;
    private javax.swing.JScrollPane jScrollPane9;
    private javax.swing.JTabbedPane jTabbedPane1;
    private javax.swing.JMenuBar mbMenu;
    private javax.swing.JMenu menuStaffID;
    private javax.swing.JMenu menuStaffName;
    private javax.swing.JPasswordField pass;
    private javax.swing.JPasswordField pass1;
    private javax.swing.JPanel pnQuanLiKhoa;
    private javax.swing.JPanel qlgvCreate;
    private javax.swing.JPanel qlgvCreate1;
    private javax.swing.JPanel qlgvEdit;
    private javax.swing.JPanel qlgvEdit1;
    private javax.swing.JPanel qlgvEditUser;
    private javax.swing.JPanel qlk;
    private javax.swing.JPanel qlk1;
    private javax.swing.JPanel qlk2;
    private javax.swing.JPanel qlk3;
    private javax.swing.JPanel qlk4;
    private javax.swing.JPanel qlk5;
    private javax.swing.JPanel qlk6;
    private javax.swing.JPanel qlk7;
    private javax.swing.JPanel qlk8;
    private javax.swing.JPanel qlkCreate;
    private javax.swing.JPanel qlkEdit;
    private javax.swing.JPanel qlkhCreate;
    private javax.swing.JPanel qlkhEdit;
    private javax.swing.JPanel qlkthaotac;
    private javax.swing.JPanel qlkthaotac2;
    private javax.swing.JPanel qlkthaotac3;
    private javax.swing.JPanel qlkthaotac4;
    private javax.swing.JPanel qlkthaotac5;
    private javax.swing.JPanel qlkthaotac6;
    private javax.swing.JPanel qlkthaotac7;
    private javax.swing.JPanel qlkthaotac8;
    private javax.swing.JPanel qlkthaotac9;
    private javax.swing.JPanel qlkyCreate;
    private javax.swing.JPanel qlkyEdit;
    private javax.swing.JPanel qllopCreate;
    private javax.swing.JPanel qllopEdit;
    private javax.swing.JPanel qlmonCreate;
    private javax.swing.JPanel qlmonEdit;
    private javax.swing.JPanel qlnhomCreate;
    private javax.swing.JPanel qlnhomEdit;
    private javax.swing.JPanel qlsvCreate;
    private javax.swing.JPanel qlsvEdit;
    private javax.swing.JPanel qltkbCreate;
    private javax.swing.JPanel qltkbEdit;
    private javax.swing.JPanel quanlikhoa;
    private javax.swing.JPanel quanlikhoa2;
    private javax.swing.JPanel quanlikhoa3;
    private javax.swing.JPanel quanlikhoa4;
    private javax.swing.JPanel quanlikhoa5;
    private javax.swing.JPanel quanlikhoa6;
    private javax.swing.JPanel quanlikhoa7;
    private javax.swing.JPanel quanlikhoa8;
    private javax.swing.JPanel quanlikhoa9;
    private javax.swing.JRadioButton rdgv;
    private javax.swing.JRadioButton rduser;
    private javax.swing.JPasswordField retypepass;
    private javax.swing.JPasswordField retypepass1;
    private javax.swing.JTextField search;
    private javax.swing.JTable tableDiemDanh;
    private javax.swing.JTable tableFine;
    private javax.swing.JTable tableGiangVien;
    private javax.swing.JTable tableGiangVien1;
    private javax.swing.JTable tableKhoa;
    private javax.swing.JTable tableKhoaHoc;
    private javax.swing.JTable tableKy;
    private javax.swing.JTable tableLop;
    private javax.swing.JTable tableMon;
    private javax.swing.JTable tableNhom;
    private javax.swing.JTable tableSinhVienLop;
    private javax.swing.JTable tableSinhVienNhom;
    private javax.swing.JTable tableSinhvien;
    private javax.swing.JTable tableThoiKhoaBieu;
    private javax.swing.JTextField txtKHKhoaHocID;
    private javax.swing.JTextField txtKHTenKhoaHoc;
    private javax.swing.JTextField txtKHTenKhoaHoc2;
    private javax.swing.JTextField txtKKhoaID2;
    private javax.swing.JTextField txtKTenKhoa2;
    private javax.swing.JTextField txtKTenKhoaT;
    private javax.swing.JTextField txtKYTenKy1;
    private javax.swing.JTextField txtSearchGiangVien;
    private javax.swing.JTextField txtSearchKhoaHoc;
    private javax.swing.JTextField txtSearchKy;
    private javax.swing.JTextField txtSearchLop;
    private javax.swing.JTextField txtSearchMonHoc;
    private javax.swing.JTextField txtSearchNhom;
    private javax.swing.JTextField txtSearchSinhvien;
    private javax.swing.JTextField txtdasdasdas1;
    private javax.swing.JTextField txtgvcmnd1;
    private javax.swing.JTextField txtgvcmnd2;
    private javax.swing.JTextField txtgvdantoc1;
    private javax.swing.JTextField txtgvdantoc2;
    private javax.swing.JTextField txtgvdiachi1;
    private javax.swing.JTextField txtgvdiachi2;
    private javax.swing.JTextField txtgvdienthoai1;
    private javax.swing.JTextField txtgvdienthoai2;
    private javax.swing.JTextField txtgvemail1;
    private javax.swing.JTextField txtgvemail2;
    private javax.swing.JTextField txtgvgvid;
    private javax.swing.JTextField txtgvhocvi1;
    private javax.swing.JTextField txtgvhocvi2;
    private javax.swing.JTextField txtgvhoten1;
    private javax.swing.JTextField txtgvhoten2;
    private javax.swing.JTextField txtgvquoctich1;
    private javax.swing.JTextField txtgvquoctich2;
    private javax.swing.JTextField txtkykyid;
    private javax.swing.JTextField txtkytenky2;
    private javax.swing.JTextField txtloplopid;
    private javax.swing.JTextField txtloptenlop1;
    private javax.swing.JTextField txtloptenlop2;
    private javax.swing.JTextField txtmhmonhocid;
    private javax.swing.JTextField txtmhtenmon1;
    private javax.swing.JTextField txtmhtenmon2;
    private javax.swing.JTextField txtmhtong1;
    private javax.swing.JTextField txtmhtong2;
    private javax.swing.JTextField txtnhomnhomid;
    private javax.swing.JTextField txtnhomtennhom1;
    private javax.swing.JTextField txtnhomtennhom2;
    private javax.swing.JTextField txtsvcmnd1;
    private javax.swing.JTextField txtsvcmnd2;
    private javax.swing.JTextField txtsvdantoc1;
    private javax.swing.JTextField txtsvdantoc2;
    private javax.swing.JTextField txtsvdiachi1;
    private javax.swing.JTextField txtsvdiachi2;
    private javax.swing.JTextField txtsvdienthoai1;
    private javax.swing.JTextField txtsvdienthoai2;
    private javax.swing.JTextField txtsvemail1;
    private javax.swing.JTextField txtsvemail2;
    private javax.swing.JTextField txtsvhoten1;
    private javax.swing.JTextField txtsvhoten2;
    private javax.swing.JTextField txtsvquoctich1;
    private javax.swing.JTextField txtsvquoctich2;
    private javax.swing.JTextField txtsvsinhvienid;
    private javax.swing.JTextField txttkbphong2;
    private javax.swing.JTextField txttkbphong3;
    private javax.swing.JTextField txttkbtkbid;
    private javax.swing.JTextField txttkbtong2;
    private javax.swing.JTextField txttkbtong3;
    private javax.swing.JTextField txttpSearch;
    private javax.swing.JTextField txtucmnd;
    private javax.swing.JTextField txtudantoc;
    private javax.swing.JTextField txtudiachi;
    private javax.swing.JTextField txtudienthoai;
    private javax.swing.JTextField txtuemail;
    private javax.swing.JTextField txtugvid;
    private javax.swing.JTextField txtugvidthem;
    private javax.swing.JTextField txtuhocvi;
    private javax.swing.JTextField txtuhoten1;
    private javax.swing.JTextField txtuhoten2;
    private javax.swing.JTextField txtuhoten3;
    private javax.swing.JTextField txtukhoa;
    private javax.swing.JTextField txtuquoctich;
    private javax.swing.JTextField txtuser;
    // End of variables declaration//GEN-END:variables
}
